Docs / Transformers / While

While

Repeat loop body until a condition is met.

Ports

Inlet
Input (any)
Outlets
Loop (any) — fires each iteration
Done (any) — fires when condition is met or max iterations reached

Configuration

Parameter Type Default Description
conditionField text "done" The payload key to check each iteration. This is a raw key name (not a template) — it references loop-body state directly. Supports dot notation for nested fields (e.g. data.done), same as the Condition node.
conditionValue text "true" The value to compare against. Supports {{variable}} templates, re-evaluated against the current payload on each iteration — e.g. {{target}} compares the condition field to another payload value that can change inside the loop.
conditionMode dropdown until until stops when condition matches; while continues as long as it matches.
maxIterations number 20 Safety limit to prevent infinite loops. The loop exits via Done when this limit is reached.

Output Payload

When the loop exits via the Done outlet, the payload includes:

_while_exceeded Boolean. true if the loop stopped because maxIterations was reached rather than the condition being satisfied.

What the log shows

Every pass is logged. Each node in the loop body writes its own block per pass, tagged with the pass number — Song remaining time #12 — with that pass’s input and output. The blocks stream into the terminal as each pass completes, so a long poll can be watched while it runs, and the run’s history keeps them (the newest 500 passes). The node card on the canvas shows the latest pass.

Example