Order in which Branches are Run
When an Activity has multiple branches, regardless of the number of branches or the order in which the branches appear in the UI, the branch execution follows a pre-defined order.
The order in which the branches are run is as follows.
- Success with condition branch
This branch runs only if its branch condition is met.
- Success with no matching condition branch
This branch condition is displayed only when there is at least one existing Success with condition branch for the Activity. The Success with no matching condition branch is typically used when you want a specific outcome if none of the Success with condition branches meet their condition.
- This branch runs only if none of the Success with condition branches run. If the Success with condition branch runs and it does not have a Return Activity at the end of the branch, the flow execution control is passed to the success branch. If the Success with condition has a Return activity, the flow execution is ended after the Success with condition branch runs.
- If you delete all Success with condition branches without deleting the Success with no matching condition branch, you receive a warning informing you that the Success with no matching condition branch is orphaned.
- Success branch
When an Activity has both Success and Success with condition branches, always the success with condition branch runs first. And if there are multiple success branches, the order of execution depends on the reverse order in which the each branch was created, that is, the success branch that was created at last is executed first.
The Error branch is run as soon as the flow execution encounters an error.