It is often necessary to check several conditions before directing the flow of a process to the right task or actor.
So here’s how to set up a complex condition.
Example
A user can make multiple purchase requests. If it concerns computer equipment and the amount exceeds 2000€, it must be validated by the person in charge, otherwise it will go through a simple validation by the accounting department.
Since we will need to check the value of two variables (the type of claim and its amount), we will use complex conditions.
Visualization of the process in question :
In this process we have:
- A closing door.
- A human task “Fill out purchase requisition” that will be completed by the applicant. He’ll have to fill in two things:
- “Is the request for the purchase of computer equipment?”
- “What is the amount (in €)? “.
- An opening door (named 1) that will send the purchase request to the validator (the person in charge or the accounting department).
- A human task “Responsible Validation” intended to validate or not a request for the purchase of computer equipment at more than 2000€.
- A human task “Validation Service Compta” which will validate or not, requests for the purchase of computer equipment below 2000€ and those not concerning the purchase of computer equipment.
- A closing door.
- An opening door (named 3) that will take into account the answer given by the surveyed Validator. If the request is rejected, the process returns to the purchase requisition.
Process variables
So we need two variables which are:
- [Computer purchase?]: A mandatory Boolean that displays two radio buttons “Yes” and “No”.
- [Montant de l’achat] A whole number.
These two variables will be completed in the “Complete Purchase Request” task form.
Complex Condition Writing
Textually, the condition will look like this:
If [hardware purchase?] is “true” and [montant de l’achat] is greater than 2000€ then the request should go to the “Responsible Validation” task.
In all other cases, the request will go through the other flow (the “Validation Service Accounting” task).
We select the gate that’s going to have the complex condition.
You can now edit the condition that will go to the “Responsible Validation” task.
Click on “Complex Mode” to be able to do 2 (or more) checks on the variables.
The conditions can be cumulated with the following logical operators:
We then compare our variables using the following comparison operators: