Use Branch by Value to compare one Text or Number value with configured match values and execute exactly one branch. A separately selected default branch runs when no match exists.
Step Library: Flow Control > Branching & Conditions
When to use this step
Use this step when you want to:
- select one of two or more paths from an exact Text or Number value;
- route known values such as statuses, categories or numeric codes;
- provide a fallback path for values that do not have a configured match.
Common examples include:
- sending requests to different teams based on a department or category;
- handling each order status with a different sequence of steps; or
- routing known priority or result codes while keeping a fallback path for unexpected values.
Use Branch by Condition instead when routing depends on ranges, operators or several conditions.
Use Branch by Stage instead when child steps should move between named stages.
Before you begin
This step does not require a connection or special permissions.
Create or identify the Text or Number variable that the step should evaluate. The variable must contain a value of the selected type when the step runs.
Plan at least two branches. Each branch, including the default branch, requires its own unique match value.
Configure the step
- Add Branch by Value from Flow Control > Branching & Conditions.
- Select the step to open its configuration panel.
- Select the Text or Number Variable to evaluate.
- Select the Default branch that should run when no match exists.
- Under Branches, enter a unique Match value for every branch.
- Optional: Enter a Label (optional) for each branch.
- Use Add branch to create more branches, and reorder or delete branches as needed. At least two branches must remain.
- Add child steps to each branch.
- Save or publish the workflow.
Settings
| Setting | Required | Accepted values | Visible when | Description |
|---|---|---|---|---|
| Step Label | No | Fixed Text, up to 80 characters | Always | Optional name for the step. The default is empty, and the Designer displays Branch by Value. This label does not affect branch selection. |
| Variable to evaluate | Yes | One Text or Number variable or compatible property | Always | Supplies the runtime value used for branch selection. Start Event, Workflow, Context and available previous-step variables can be selected when their resolved type is Text or Number. Fixed values and implicit type conversion are not supported. There is no default selection. |
| Default branch | Yes | One configured branch; fixed selection only | Always | Selects the fallback branch when no Match value equals the evaluated value. The first branch is selected by default. The default branch still requires its own match value and can be selected by that value normally. |
| Branches | Yes | Two or more ordered branches | Always | Defines the available paths. Two branches exist by default. Add branch creates another branch. Branches can be reordered, and deletion is disabled while only two remain. Deleting a branch that contains child steps requires confirmation. There is no step-specific maximum beyond the general workflow limits. |
| Match value | Yes | Fixed non-empty Text or finite Number matching the source type | Each branch | Selects the branch when it exactly equals the evaluated value. Match values must be unique across all branches. Text matching is case- and whitespace-sensitive. Number values can be negative or decimal but must be finite. The displayed Number uses the user's regional format while the stored numeric value is unchanged. |
| Label (optional) | No | Fixed Text or not set | Each branch | Changes the branch's visible name without changing its match value or routing behavior. When not set, the branch displays its Match value. The selected default branch also shows Default as its role. |
A new step starts with Text match values Value 1 and Value 2; the first branch is the default. Selecting a Text source preserves compatible Text matches. Selecting a Number source, or changing between Text and Number sources, replaces all match values with unique values of the selected type, starting with 0 and 1 for Number or Value 1 and Value 2 for Text.
Adding a branch assigns the first unused Value N Text or non-negative whole Number. Reordering branches, changing labels or selecting another default branch preserves branch contents and match values. If the default branch is deleted, the first remaining branch becomes the default.
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 are available to later child steps and remain available to steps after Branch by Value completes. A change made before suspension is retained when the workflow resumes.
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 leave scope when the branch completes and are not available to steps following Branch by Value.
Runtime behavior
Execution and completion
When execution reaches Branch by Value, Flowifier resolves Variable to evaluate once. The value must be Text or a finite Number. Flowifier then compares it with every branch's Match value using exact type and value equality. Text and Number values are never converted into each other.
The first exact match selects its branch. Because match values must be unique, at most one branch can match. The default branch participates in normal matching through its own match value. Flowifier uses it as the fallback only when no branch matches. An empty Text source value is valid, but because an empty Match value is not allowed, it selects the default branch.
The step completes after every child step in the selected branch completes successfully. Branch by Value does not call an external provider and has no external side effects of its own.
Branches and child steps
Only the selected branch runs. Its child steps execute sequentially in their configured order. Unselected branches do not create activities or run child steps. Branch by Value does not repeat branches or run them in parallel.
Workflow variable changes made by completed child steps are retained. Child step outputs remain available only inside the selected branch.
Child steps keep their own external side effects and failure behavior. Branch by Value does not roll back a completed child step when a later child step fails, is cancelled or terminates the workflow.
Failure, retry and resume behavior
This step does not perform automatic retries. Starting the workflow again creates a new instance and can repeat side effects produced by child steps.
If the source or persisted branch configuration is invalid at runtime, the step fails before a branch starts and reports that the flow-control configuration is invalid. If a child step fails, the selected branch stops immediately. The failed child shows its safe actionable error when one is available, while Branch by Value reports A step in this branch failed. Review the failed child step for details.
If a child step suspends the workflow, Branch by Value is suspended with it. When the workflow resumes, Flowifier continues from the suspended child in the previously selected branch. It does not reevaluate Variable to evaluate, even if a child changed that variable before suspension. Child steps that completed before suspension do not run again.
Cancellation and termination propagate from the selected branch. Remaining child steps and steps following Branch by Value do not run.
Errors and limits
| Situation | Result | Resolution |
|---|---|---|
| Variable to evaluate is missing or does not resolve to Text/Number | The workflow cannot be published. | Select a Text or Number variable or compatible property. |
| Default branch is missing or refers to a deleted branch | The workflow cannot be published. | Select one of the configured branches. |
| A branch has no Match value | The branch shows Enter a match value, and the workflow cannot be published. | Enter a non-empty Text or finite Number value matching the source type. |
| A Match value has the wrong type | The branch reports that the match must have the same type as the source, and publishing is blocked. | Use Text matches for a Text source or Number matches for a Number source. |
| Two branches have the same Match value | The later branch shows Match values must be unique, and the workflow cannot be published. | Give every branch a different exact value. |
| The runtime source is missing, has the wrong type or is not finite | The step fails before a branch starts and reports an invalid flow-control configuration. | Ensure the selected variable contains a Text or finite Number value before this step runs. |
| No Match value equals the source | The configured Default branch runs. | No correction is required when fallback behavior is intended; otherwise add the missing match. |
| A child step fails | The selected branch stops, and Branch by Value directs the user to the failed child activity for details. | Inspect and correct the failed child step, then publish and start a new workflow instance. |
| A child step cancels or terminates the workflow | The selected branch stops immediately, and cancellation or termination is propagated. | Review the child action that caused the cancellation or termination. |
| A child step creates an external side effect before a later failure | The completed side effect is not rolled back. | Check the external system before starting the workflow again to avoid duplicates. |
At least two branches must remain. Match Numbers must be finite, and Match Text cannot be empty. This step has no additional maximum branch count or other limits beyond the general workflow limits and the limits of its child steps.
Example
Route an approval result
Goal: Run a dedicated path for approved and rejected requests and use a fallback for every other value.
Configuration:
- Text workflow variable:
Approval result -
Variable to evaluate:
Approval result - First Match value:
Approved - First Label (optional):
Approved - Second Match value:
Rejected - Second Label (optional):
Rejected - Third Match value:
Other - Third Label (optional):
Other result -
Default branch:
Other result
Add the approved actions to the Approved branch, rejected actions to Rejected, and fallback handling to Other result.
Result: Approved selects only the Approved branch, and Rejected selects only the Rejected branch. Other selects the default branch through its normal match. Any other value, including empty Text, selects the same branch as the fallback. After the selected branch completes, the workflow continues with the step following Branch by Value.
Related information
- Branch by Condition — select one of two branches by evaluating one or more conditions.
- Branch by Stage — move between named stages while the workflow runs.
- Run If — run child steps only when a condition is true, without an alternative branch.
- Workflow variables — retain values for use inside and after the selected branch.
Comments
0 comments
Please sign in to leave a comment.