Control workflow execution
Execution control steps let you branch, loop, and handle errors so your workflow responds correctly to varying conditions and runtime outcomes.
Real-world automation rarely follows a single linear path. Automation orchestrator provides control flow steps that evaluate conditions, route execution down different branches, iterate over collections of items, and catch errors so the workflow can recover or fail gracefully. You combine these steps with action and task agent steps to build workflows that adapt to the data they process.
- Understand control flow steps
The workflow builder includes logic steps that control the flow of execution by pausing, branching, synchronizing, and iterating through a workflow. Five types of control flow steps are available: - Add a wait step to a workflow
You can add a wait step to a workflow to pause execution for a specified duration before the workflow continues to the next step. Use a wait step when your workflow needs a deliberate delay, such as waiting for an external system to process a request or spacing out API calls. - Add a conditional step to a workflow
You can add a conditional step to route execution along one of two paths based on an expression. The step evaluates the expression and follows the True path or the False path. For more than two paths, use a switch step instead. - Add a switch step to a workflow
You can add a switch step to route execution to one of several branches based on conditions. A switch step supports multiple named output paths and evaluates them in definition order, routing to the first match. - Add a converge step to a workflow
A converge step waits for parallel branches to finish before the workflow continues. It supports two join strategies: wait for all branches, or wait for a specified number. - Add a For each loop step to a workflow
Use a For each loop when you have a known list of items to process from an earlier step. The loop iterates over each item in the collection and executes the loop body for each one. - Add a While loop step to a workflow
Use a While loop when you want to repeat steps until a condition is met, such as polling for a status change. The loop body always runs at least once before the first condition check. - Loop step drag behavior on the canvas
Dragging a loop step moves all its body steps as a group. - Loop context and iteration variables
When a loop step executes, the system creates a loop context that makes iteration data available to every step inside the loop body. You reference this data by using the${loop.*}expression prefix. - Common loop patterns
The following patterns illustrate common ways to use loop steps in automation workflows. - Connect steps and pass data between them
When you build a workflow, you connect steps to define the execution order and pass data between them. Each connection creates a path that the workflow engine follows at runtime, making upstream output available to downstream steps through expressions.