A Branch step controls the flow of an approval by allowing different paths based on conditions.
There are two types of Branch steps:
- Conditional Branch: Paths are taken only if specific conditions are met.
- Unconditional Branch: Allows multiple paths to run in parallel or a single path to be chosen later.
Properties
Configurable properties
The Branch step includes the following configurable properties:
| Property | Description |
|---|---|
| Name | Give the Branch step a clear, meaningful name that reflects the decision or purpose of the branch. |
| Type | Choose the type of Branch: either Conditional or Unconditional. |
| Mode | Determines how the Branch behaves, based on the selected Type. Possible values: First valid path, All valid paths, All paths, or First step. |
| First step state | Used only when Type is Unconditional and Mode is First step. This defines the event in the first step of a path that will trigger that path to be selected. Options: Step previewed, Step started, Step saved, or Step completed. |
The combination of these settings enables the following branch behaviors:
System properties
The Branch step has no built-in properties.
Conditional branch
First valid path
This branch evaluates conditions in order and selects the first path whose condition is true. If none of the conditions are true, the final path is taken by default.
| Property | Value |
|---|---|
| Type | Conditional |
| Mode | First valid path |
All valid paths
This branch evaluates all conditions and follows every path whose condition is true. If no condition is true, the final path is taken.
| Property | Value |
|---|---|
| Type | Conditional |
| Mode | All valid paths |
Unconditional branch
All paths
This branch ignores conditions and follows all paths at the same time. These parallel paths later converge at a corresponding Merge step.
| Property | Value |
|---|---|
| Type | Unconditional |
| Mode | All paths |
First step
This branch activates all possible paths at first. The actual path is chosen based on what happens in the first step of each path. When one activity in a path reaches the specified First step state, that path is selected and all others are withdrawn.
| Property | Value |
|---|---|
| Type | Unconditional |
| Mode | First step |
| First step state | Step previewed or Step started or Step saved or Step completed |
Paths
A path is one of the distinct routes from a Branch step. Each path begins at the Branch and leads to its own sequence of steps. Depending on the Branch’s configuration, a path may be taken because its condition evaluates to true, because all paths are triggered unconditionally, or because the first step in that path reaches a specified state before the others. Only the Branch’s rules determine which path or paths are activated, how many are followed, and whether they run in parallel or individually.
In the Flow Builder, each path appears in the branch’s property panel. The order of the paths matters because it determines the order in which their conditions are checked.
Adding and removing
To add or remove paths from a Branch, open the … options menu on the Branch.
- Choose Add path to create a new path.
- Choose Remove path, then select the path you want to delete.
Reordering
Reordering paths changes the order in which their condition formulas are checked. To reorder paths, open the … options menu on the Branch, choose Shift path, then select the path you want to move and choose Left or Right.
Variable updates
You can update one or more variables when the approval reaches a Branch step or follows a path in a Conditional branch. Click Add, select the variable, and enter a formula. Learn more here.