Ending a flow
When you need Return, Stop, or Fail, when a flow ends on its own, and how Break and Continue steer a loop.A flow does not have to end with a node. When an exec path runs out of connections, the flow simply stops there and the handler returns on its own. So most graphs need no ending node at all: the last action runs, there is nothing wired after it, and the flow is done.
You reach for a flow-control node when you want to end the flow sooner than that, steer a loop, or mark a run as failed.
Return: end this path
Return stops the current path right where it sits. At the top level that ends the whole handler. Inside an async, parallel, or thread-pool scope it ends only that one branch, not the rest of the flow. Use it to bail out of a branch early once there is nothing left to do.
Stop: end the whole flow
Stop ends the entire handler from anywhere, including from inside a parallel or for-each-parallel scope. That is the difference from Return: where Return inside a concurrency scope ends just that branch, Stop ends everything. If you are at the top level, Return and Stop do the same thing, so keep Stop for the case where you need to break out of a nested scope.
Fail: end as a failure
Fail ends the flow and reports the run as failed, with an optional message that is written to the log. Use it when a run cannot sensibly continue (a required service is down, an input is invalid) and you want that surfaced in your logs rather than ending quietly. Inside a for-each-parallel scope a Fail is caught per item and the batch keeps going, matching that scope's failure-safe behavior; a Stop in the same spot ends the whole flow.
Break and Continue: steer a loop
Inside a While, For, For Each, or Repeat loop, Break leaves the loop right away and Continue skips to the next iteration. Both are valid only inside a loop body. If you place one with no enclosing loop, or across a concurrency scope that a loop control cannot cross, the graph reports a hard error instead of compiling to broken code.
What the warnings mean
After a compile the editor may flag a node with an advisory highlight. These never block the compile; they point out a path that probably does not do what you meant:
- Empty branch: a loop body or an If's then branch is wired to nothing, so that path does nothing.
- Unreachable node: a node the flow never reaches from the trigger, so it never runs.
- Empty entry: the trigger is not connected to anything, so the whole flow is a no-op.
Fix the wiring if the warning is real, or leave it if the empty path is what you intended.
