Use Branch by Condition to evaluate one or more conditions and execute exactly one of two branches. The false branch is shown as No by default, and the true branch is shown as Yes by default.
Step Library: Flow Control > Branching & Conditions
When to use this step
Use this step when you want to:
- choose between two paths by evaluating workflow data;
- combine several conditions so that either all conditions or at least one condition must be met;
- give the false and true paths descriptive labels.
Use Run If instead when child steps should run only when a condition is met and no alternative branch is required.
Use Branch by Value instead when one value must select from more than two branches.
Before you begin
This step does not require a connection or special permissions.
Create or identify the variables and previous step outputs that the conditions should evaluate. A variable used for a value comparison must contain a value of the expected type when the step runs.
Configure the step
- Add Branch by Condition from Flow Control > Branching & Conditions.
- Select the step to open its configuration panel.
- Under Conditions, select whether all conditions or at least one condition must be met.
- Select Add condition, choose a variable, and select an operator.
- When Comparison value appears, enter a fixed value or select a compatible variable.
- Add further conditions as needed.
- Optional: Under Branches, enter a False branch label (optional) and a True branch label (optional).
- Add child steps to the false and true branches.
- Save or publish the workflow.
Settings
| Setting | Required | Accepted values | Visible when | Description |
|---|---|---|---|---|
| Conditions to match | Yes | All conditions must be met or At least one condition must be met | Always | Controls how the condition group is evaluated. The default is All conditions must be met. At least one complete condition is required. |
| Select variable | Yes | Start Event, Workflow, Context, or available previous-step variable | Adding or editing a condition | Selects the left side of the condition. The variable type determines which operators are available. |
| Operator | Yes | An operator supported by the selected variable type | A variable is selected | Defines how the variable is evaluated. Changing the selected variable clears the current operator and comparison value. |
| Comparison value | Yes | Fixed Text, Number, Boolean, or Date value, or a compatible variable | The selected operator compares the variable with another value | Defines the right side of the comparison. It is hidden for operators such as is set, is empty, and is true that do not compare against another value. |
| False branch label (optional) | No | Fixed Text or not set | Always | Changes the label of the branch that runs when the condition group evaluates to false. When not set, the branch is labeled No. |
| True branch label (optional) | No | Fixed Text or not set | Always | Changes the label of the branch that runs when the condition group evaluates to true. When not set, the branch is labeled Yes. |
Available operators depend on the selected variable type:
| Variable type | Operators |
|---|---|
| Text | is set, is not set, equals (=), not equals (≠), is empty, is not empty, begins with, does not begin with, ends with, does not end with, contains |
| Number or Date | is set, is not set, equals (=), not equals (≠), is less than (<), is less than or equal (≤), is greater than (>), is greater than or equal (≥) |
| Boolean | is set, is not set, equals (=), not equals (≠), is true, is not true, is false, is not false |
| File, Object, or collection | is set, is not set |
Data and outputs
Workflow variable effects
This step does not directly modify workflow variables.
Child steps in the selected branch can modify workflow variables. Those changes remain available to later child steps and to steps following Branch by Condition.
Step outputs
This step does not expose step outputs.
Outputs created by a child step are available to later child steps in the same selected branch. They are removed when the branch completes and are not available to steps following Branch by Condition.
Runtime behavior
Execution and completion
When the step starts, Flowifier evaluates the configured condition group. With All conditions must be met, the group is true only when every condition is true. With At least one condition must be met, the group is true when any condition is true.
Conditions are evaluated in their configured order until the group result is determined. Flowifier then runs the true or false branch. The step completes after every child step in the selected branch completes successfully.
Branch by Condition does not call an external provider and has no external side effects of its own.
Branches and child steps
This step always has exactly two branches:
| Result of the condition group | Branch | Default label |
|---|---|---|
| False | False | No |
| True | True | Yes |
Only the selected branch runs. Its child steps execute sequentially in their configured order. The unselected branch does not create activities or run child steps.
Workflow variable changes made by child steps are retained. Child step outputs are limited to the selected branch and are not exposed after Branch by Condition completes.
Child steps keep their own external side effects and failure behavior. Branch by Condition does not roll back changes made by a child step when a later child step fails.
Failure, retry and resume behavior
This step does not perform automatic retries.
If evaluating a condition fails, the step fails before either branch starts. If a child step fails, is cancelled, or terminates the workflow, Branch by Condition propagates that result and does not run the remaining child steps.
If a child step suspends the workflow, Branch by Condition is suspended with it. When the workflow resumes, Flowifier continues the same child step in the previously selected branch. The conditions are not evaluated again, even if a child step changed a variable used by the conditions before the suspension.
Errors and limits
| Situation | Result | Resolution |
|---|---|---|
| No condition is configured | The step shows At least one condition is required, and the workflow cannot be published. | Add at least one complete condition. |
| A condition has no variable or operator | The condition cannot be added. | Select a variable and an operator. |
| A required Comparison value is missing | The condition cannot be added or the workflow fails validation. | Enter a fixed comparison value or select a compatible variable. |
| A value comparison resolves an unset operand | The step fails before a branch starts. | Set the referenced value before this step, or use is set or is not set when an unset value is expected. |
| A comparison value has an incompatible type | The condition cannot be published or fails at runtime. | Use a fixed value or variable with the same compatible type as the selected variable. |
| A child step fails | The selected branch stops, and the failure is propagated. | Inspect the failed child step in the workflow instance log. |
| A child step cancels or terminates the workflow | The selected branch stops immediately, and the cancellation or termination is propagated. | Review the child step or action that caused the cancellation or termination. |
| A child step creates an external side effect before a later step fails | The completed external side effect is not rolled back by Branch by Condition. | Review the child step’s recovery guidance before retrying or restarting the workflow to avoid duplicate side effects. |
This step has no additional limits beyond the general workflow limits.
Example
Route an approval result
Goal: Run one path when an item is approved and another path when it is rejected.
Configuration:
- Conditions to match: All conditions must be met
- Select variable:
approved - Operator: equals (=)
- Comparison value:
true - False branch label (optional):
Rejected - True branch label (optional):
Approved
Add the steps for rejected items to the Rejected branch and the steps for approved items to the Approved branch.
Result: When approved is true, only the Approved branch runs. When approved is false, only the Rejected branch runs. After the selected branch completes, the workflow continues with the next step following Branch by Condition.
Related information
- Run If — run child steps only when a condition is met, without creating an alternative path.
- Branch by Value — select from multiple branches by comparing one value with configured branch values.
- Branch by Stage — move through branches by using workflow stages.
- Workflow variables — store and update values throughout a workflow.
Comments
0 comments
Please sign in to leave a comment.