Types of Branch Conditions
Flogo supports multiple types of branch conditions.
Select one of the following conditions during branch creation:
- Success
A success branch is run whenever an activity is run successfully. If there is an error in the activity completion, this branch does not run. The branch has no conditions set in it.
- Success with condition
Select this condition if you want a branch to run only when a particular condition is met. If you select this condition and do not provide the condition, the branch never runs.
You can form an expression using anything available under upstream activity outputs and available functions, which should evaluate to a boolean result value.
- Success with no matching condition
This branch condition is displayed only when you already have an existing Success with condition branch.
- Error
A branch with this condition runs if there are errors in completion of the activity. An activity can have only one Error branch.
Details of the error, such as the Activity and the type of the error message, are returned in
$error
. For example:The Error branch flow differs from the error handler flow. In the error branch, the error branch is designed to catch exceptions at the activity level from which the error branch originates. Whereas the error handler flow is designed to catch exceptions that occur in any activity within the flow. So, if you handle the errors by creating an error branch at the activity level, the flow execution control never transfers to the error handler flow.