Quester Studio

foreach

Framed loop — body per item, complete with results

foreach is a framed subgraph container. Resolve items to an array, then run the body once per element. Templates inside the body can use {{item}} / {{index}} (or a custom itemVar). Outer continuation uses the complete handle with collected results.

Wiring

Same entry/exit model as tryone body entry and one body exit. Outer continuation is the header-right complete handle.

EdgeHandles
Outside → frametarget = foreach
Frame → bodysourceHandle: "entry"
Body → frametargetHandle: "exit"
Frame → outsidesourceHandle: "complete"

Nesting

Same rules as try: nest foreach inside try (or the reverse) with no max depth; reject parent cycles. Canvas hit-test picks the deepest frame. When a nested frame is the body child, wires use parent entry → child in and child outer handle (success / failed / complete) → parent exit — body entry/exit stay inside the nested frame.

Example sample: examples/sample-workspace/flows/nested-frames.flow.json (foreachtry → template).

Fields

FieldRequiredNotes
itemsyesJMESPath on previous output, or templated JSON array string
itemVarnoTemplate scope name (default item)
maxItemsnoCap (default 100, hard max 10000)
concurrencynoParallel body iterations (max 32)
labelnoUI only

Legacy map-only map is rejected — put mapping logic in body nodes instead.

Output

{ "results": [ /* per-item exit outputs */ ], "count": 3, "truncated": false }