Nodes
For each
Runs a published decision once per list element and collects the outputs.
The For each node loops over a list. For every element it runs a published decision and collects the answers, in order, into a new list.
When to use it
- Evaluate every transaction, line item or applicant of a batch with the same rules.
- Keep the per-item logic in one decision instead of copying nodes.
How it works
- The items expression produces the list.
nullcounts as an empty list; anything that is not a list is an error. A list longer than the limit is refused (1,000 by default). - For each element, in order, the input mapping builds the child payload. The mapping can read
item(the element) andindex(its position), besides the usual scope. - The child decision runs, and its outputs are added to the result list.
- When all elements are done, the list is stored and the flow continues.
Ports
| Port | Taken when |
|---|---|
Next | Always, after the last element. |
Configuration
| Field | What it does |
|---|---|
| Name | Label shown on the canvas and in the trace. |
| Items | The expression that yields the list. |
| Decision | The published decision to run per element. Its version is pinned at publish. |
| Input mapping | Child input field to expression; it can use item and index. |
| Store results in | The variable that receives the list of outputs. Required. |
| Max items | Refuses longer lists instead of running forever. |
What it writes
A list under your variable, one entry per element and in the same order: vars.results[0].flagged. The trace contains the child trace of every item.
In a real flow
Every transaction of the payload is scored by a child decision. A condition then checks whether any result was flagged.
When it fails
- One element fails: the whole node fails. A list evaluated half-way is not an answer.
- The value is not a list (
VALIDATION_FAILED) or has more elements than allowed. - No decision, no list expression or no output variable are errors in Checks.
Good to know
- Elements run one after another so the trace reads in order. For independent, different checks at once, use Parallel.