Iteration iteration
An iteration container applies one child-canvas scope to every member of a collection. The items expression is evaluated before the container starts, giving the host a deterministic input set to compile into stable tasks or child runs. Use it when every member follows the same processing structure and each item needs an explicit input and result boundary. Window very large collections before they reach the container so one run does not retain excessive task state.
Child-canvas structure
Each iteration container owns exactly one internal iteration-start node. Its ID must equal start_node_id, and its parentId must equal the container node ID. Every other child node uses the same parent ID. The entry node exposes the current member on its item data port, and next connects to the first executable child. Keep both endpoints of every child edge inside the same scope and include at least one executable node after the internal entry.
The normal graph stays acyclic. Do not draw a return edge to express repetition. Control enters through in and leaves through done after the host has resolved every member. The host defines serial or bounded-parallel execution, result aggregation, and failure policy. Publish those choices with the workflow because order and capacity behavior affect retries, incident handling, and reproducibility.
Stable members and validation
Give each member a repeatable business identity and avoid collections whose order depends on randomness or an unrecorded live query. Test an empty collection, one member, duplicate business keys, partial failure, runtime recovery, concurrency limits, and output ordering. When validation reports a cross-scope edge, inspect each child parentId and both edge endpoints. Use a loop container when one state should be processed repeatedly under a changing condition. For large deterministic sets, combine upstream pagination with a stable cursor and one iteration container per window.
Use it to create a child-canvas scope for each collection member. The items expression supplies the collection and the nested graph starts at one iteration-start node.
Runtime behavior
The container describes graph structure and emits no runtime command by itself. The host compiles the child canvas into stable steps or child workflows and owns member variables, concurrency, and aggregation.
Node contract
- Type
iteration- Role
- Child-canvas container
- Runtime binding
Host compilation- Durable identity
- Defined by graph structure
Configuration properties
| Property | Type and control | Default | Rules |
|---|---|---|---|
itemsItems | dictA3SFlowExpressionInput | {"apiVersion":"a3s.dev/flow-expression/v1","expression":{"op":"field","path":"input.items"}} | Collection evaluated before entering the iteration scope.Required |
start_node_idStart node ID | strStrInput | iteration-start | Stable identity of the iteration-start child in this container scope.Required · Advanced |
Child-canvas structure
| Property | Type and control | Rules |
|---|---|---|
iteration-start | internal node | The single nested entry whose parentId points to iterationRequired |
parentId | node id | Every nested node uses the same container IDRequired |
Ports
| Direction | Port ID | Kind | Value types |
|---|---|---|---|
| Input | inIn | control | FlowControl |
| Output | doneDone | control | FlowControl |
Node JSON example
The CLI creates the same structure from manifest defaults. Canvas position, title, and selection are presentation data.
CLI usage
Inspect the installed manifest first, then create the node and validate the complete workflow. Every command emits JSON.
Skill usage
The package includes the a3s-flow Skill. It queries the CLI catalog before creating, validating, compiling, and digesting a workflow.
Operational notes
- start_node_id must point to the nested iteration-start.
- Add at least one executable child besides the start marker.
- Edges cannot cross the container boundary.
