Loops
Four boxes. All of them emit their body on a dedicated output and signal the end
of the work through their done port.
ForEach
Section titled “ForEach”Iterates over a list.
| Inputs | items (json) |
| Outputs | each — one emission per element |
| Configuration | parallelism: { enabled, count } |
Without parallelism, the iterations run one after another, sequentially. With
it, up to count of them run at the same time (minimum 2).
The done port only fires once all the iteration subgraphs have finished:
that is where you wire the summary or the clean-up.
Requête HTTP ──response[body.ids]──► ForEach (parallélisme 4) ├─ each ──► Requête HTTP « détail » └─ done ──► Log « terminé »Numeric loop.
| Inputs | from, to, step (numbers) |
| Outputs | each — named index |
| Configuration | from, to, operator (< by default, or ≤, =, ≥, >, ≠), step (0 is treated as 1), parallelism |
Loop with the test up front.
| Inputs | left, right |
| Outputs | then — named body, a pure signal |
| Configuration | operator, left, right |
The body is a signal: it carries no value. Loop the end of the body back onto the
While box’s in port to re-evaluate the condition.
Use a run variable as the counter or as the stop condition.
Do…While
Section titled “Do…While”Identical to the previous one, except the body runs at least once: the test happens afterwards. The output is named loop.
Choosing
Section titled “Choosing”| Situation | Box |
|---|---|
| I have a list | ForEach |
| I know the number of iterations | For |
| The stop condition depends on a result, tested first | While |
| Same, but at least one pass is needed | Do…While |
| I want to retry on failure | Retry |
Mind the load
Section titled “Mind the load”ForEach and For parallelism sends real network calls out in parallel. On a staging environment, raise it gradually — and remember the Wait box to smooth out the pace.