You can perform calculations and validations in every activity of the process with the Activity Actions option found in the fourth step of the Process Wizard (Business Rules).
These Actions can be executed when the Case enters the Activity, when the end user clicks on the Save button, or when Case leaves the Activity.
Thus, actions can be created in the following moments:
•On Enter: Once, as soon as the Activity is created
•On Save: Every time the end users clicks on Save or when the Task is refreshed. (Applies to tasks where an end user interacts with the Process: Tasks and Intermediate Events)
•On Exit: Once, when the Activity is finished.
Actions related to Business Rules are also known as Expressions.
What you need to do in Bizagi
As soon as the Actions option is selected the Process flow will be displayed.
The tasks that have actions related will have a special mark, according to the type of action that has been associated.
You can click any task to include an Action.
Since conditional tasks do not need an incoming connector (process flow), No conditional task can have an On Enter behavior regarding Activity Actions.
Include an action associated with a Sub-Process
If an Activity action needs to be added to a Sub-Process as a whole, rather than to one of its activities there are two different ways to do it: by holding shift and clicking the Sub-Process, or by clicking the symbol on the right upper corner of the Sub-Process.
On the fourth step of the wizard (Business Rules) select the option "Activity actions".
The process model will be displayed. When a Sub-Process is clicked (a simple left-click) it will be opened to browse the activities within it.
In order to add an Activity Action to the Sub-Process instead of one of the activities within it, hold the Shift key and click the Sub-Process, or click on the symbol on the right upper corner of the Sub-Process. This will display the view to add an on-enter or on-exit action to the Sub-Process.
Then the addition of the Activity Action for the Sub-Process can be done.