Conditions
Send a task one way or another by the data of its forms, with the Switch component of Flow.
A condition sends a task one way or another by the data of its forms, for example a purchase over 1000 EUR to the management and a smaller one to the manager. BPM uses the Switch component of Flow for it.
Add the Switch component
The Switch is in the library of Flow components:
- In the designer, open the Add (plus) menu of the toolbar and select Download components. See Download components.
- Find Switch and install it.
It appears in the group Common of the designer.
Send the task by a value
This example sends a purchase request by its field amount:
1. Drag Switch onto the canvas, between the form that has the value and the next steps. Connect the output of the form, for example Send, to the input of the Switch.
2. Double-click the Switch.
3. In Source + Path to the value, keep Message data and enter the path of the field: amount.
4. Under Switch conditions, select ADD for each way, and fill in the Operator, the type Number, the Value and the Output name:
| # | Operator | Type + Value | Output name |
|---|---|---|---|
| 1 | > | Number 1000 | Over 1000 |
| 2 | <= | Number 1000 | Up to 1000 |
5. Select APPLY. The node gets one output for each condition, in the same order.
6. Connect Over 1000 to the input No data of the management approval, and Up to 1000 to the input No data of the manager approval.
7. Select APPLY in the toolbar, and then publish the process.


The value is the data of the task: the fields of the forms sent so far, by their path. After an approval, approval.result is there too, so a Switch can also send the task by the result of an approval.
Make every task go one way
- The Switch sends the task through every condition that matches. Write conditions that do not overlap, such as
>and<=the same value. - When no condition matches, the task goes nowhere: write the conditions so that one of them always matches, as in the example.
- Use the type Number for numbers. A number field of the form keeps its value as a number.
The Switch has more operators, such as between, starts with and Expression. Its Show configuration info button in the settings explains each one.