Overview
The Loop Controller node is a process-flow control node that repeats the flow-graph loop that it is in and exits when either the configured loop count is reached or all loop-controlled data-sourcing nodes inside the loop report completion. This node provides two exits: Loop branch (continue) and Exit branch (terminate).
Node Information
| Property |
Value |
| Category |
Flow control |
| Display Name |
Loop controller |
| Internal Name |
loopController |
Parameters
| Parameter |
Type |
Default |
Description |
| Max loop count |
number |
unlimited |
Maximum iterations; set a number to limit, or leave as “unlimited” |
Input Ports
| Port |
Type |
Accepts |
Required |
Description |
| Max loop count |
Number |
Number |
No |
Optional parameter input for the maximum iteration count |
Output Ports
| Port |
Type |
Description |
| Remaining loops |
Number |
Remaining iterations (diagnostic); may be 0 when exiting |
Process Flow Exits
| Exit |
Condition |
Description |
| Loop branch |
Continue |
Taken when the loop should continue |
| Exit branch |
Complete |
Taken when the loop should terminate |
How It Works
- Initializes loop state on first run; tracks loopCounter and maxLoops.
- If a finite max is set and loopCounter reaches it, takes Exit branch.
- Otherwise, inspects the nodes along the Loop branch for any with loopControlledNode flag (e.g., Loop over inputs) and checks if all such nodes report complete; if so, takes Exit branch.
- If not complete, increments loopCounter, updates state, and takes Loop branch.
Common Flows
With Loop over inputs
Loop controller ──(Loop branch)── Loop over inputs → Work → …
│
└────────────(Exit branch)──────────────→ After loop