decision control
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

  1. The items expression produces the list. null counts 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).
  2. For each element, in order, the input mapping builds the child payload. The mapping can read item (the element) and index (its position), besides the usual scope.
  3. The child decision runs, and its outputs are added to the result list.
  4. When all elements are done, the list is stored and the flow continues.

Ports

PortTaken when
NextAlways, after the last element.

Configuration

FieldWhat it does
NameLabel shown on the canvas and in the trace.
ItemsThe expression that yields the list.
DecisionThe published decision to run per element. Its version is pinned at publish.
Input mappingChild input field to expression; it can use item and index.
Store results inThe variable that receives the list of outputs. Required.
Max itemsRefuses 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.

On this page