A nested (pipeline) flow runs its child steps in order. Flow control lets you change that order at runtime: skip ahead to a later step, jump to a named step computed from a script, or end the rest of the steps entirely. Each control action is guarded by a condition — if the condition is false, the action is skipped and the next step runs as usual.
Flow control works in both the Composer canvas and the classic nested-flow editor. It complements two related capabilities:
- Conditional Execution in Workflows — decides whether a step runs.
- Looping in Workflows — iterates inside a step.
Flow control decides what happens after a step finishes — it's a post-execution gate.
The four flow-control actions
| Action | What it does |
|---|---|
| Continue (default) | Run the next step. The same as no flow control at all. |
| Go to step (fixed) | Jump to a specific step by index. The intermediate steps are skipped. |
| Dynamic goto | Jump to a step whose name or number is computed by a JavaScript / Python snippet. The snippet returns a step name (e.g., "Load failed records") or the keyword END. |
| End | Stop the nested flow. Remaining steps are not run. |
Every action except Continue is paired with condition — a JavaScript / Python snippet that returns true or false. If the condition is empty or evaluates to true, the action fires; otherwise the next step runs normally.
Configure flow control in the nested flow editor
- Open the nested flow.
- Click a step to open the step inspector on the right.
- Scroll to After this flow.
- Pick an action:
- Continue — no flow control.
- Go to step — the Go to step dropdown appears with the list of step indices. Pick the target.
- Dynamic goto — a code editor appears. Set value to the target step name or the keyword END.
- End — the rest of the steps are skipped.
- Optionally add a Condition — the action only fires when the condition evaluates true.
- Save the step.
Configure flow control in Composer
In Composer, the same After this flow options appear in the canvas-side inspector when you select a nested-flow step. The configuration is identical to the classic editor; Composer renders the control as an arrow on the canvas so the routing is visually obvious.
You can drag&drop Control Icon from tools sidebar to the block of nested flow step.
Examples
Skip the rest on no records
Step 1 extracts records from a source. If there's nothing to process, skip the remaining load steps:
- Step 1: extract records.
- Step 1 flow control: End with condition etlConfig.getValue('extracted_count') == 0.
- Step 2: load to staging (only runs when there are records).
- Step 3: load to warehouse.
Branch by source type
Different load logic per source type, decided at the end of a setup step:
- Step 1: read source-type from a configuration table.
-
Step 1 flow control: Dynamic goto with snippet:
var sourceType = etlConfig.getValue('source_type'); if (sourceType == 'salesforce') value = 'Load Salesforce'; else if (sourceType == 'database') value = 'Load Database'; else value = 'END'; - Step 2: load Salesforce (named "Load Salesforce").
- Step 3: load Database (named "Load Database").
Retry chain
If a step fails its post-load validation, jump back to the load step:
- Step 1: load data.
- Step 2: validate.
- Step 2 flow control: Go to step 1 with condition etlConfig.getValue('validation_failed') && etlConfig.getValue('retry_count') < 3.
- Step 3: report success.
Notes and limitations
- Self-references are rejected — a step cannot jump to itself directly. Wrap the step in a nested flow if you need a tight loop.
- Forward / backward jumps are both allowed. Use them carefully — backward jumps without a condition create infinite loops.
- Dynamic goto failures (unknown step name, runtime error in the snippet) abort the flow with an error.
- For iterating (process many items), prefer Looping in Workflows. Flow control is for routing, not for iteration.