Rules and Actions Execution Sequence and Mechanics
The sequence of execution is the following:
- Connector conditions are evaluated to decide which connector to go. If multiple connectors are good to go (may happen if conditions configurations are not mutually exclusive as they should be), then the one with a higher order will be used (as defined in the Connector tab of the Step properties).
- Step Validation Rules - if there was a rule fired, then an error is shown and you can't move forward.
- Step Actions - after step actions of the Step that are executed regardless of which way/connector instance will go.
- Connector Actions - actions on the connector.
- Before Step Rules of the next step.
- Before Step Actions of the next step.
Within one request, if any rules are not satisfied, or there was a problem with executing of an action, data is rolled back.
Best practices for using After/Before step actions and rules.
- Only use Before step actions and rules where necessary (e.g. Start Subprocess action, or specific business cases for rules). After step actions/rules cause less load to the system.
- Mind the difference between connector actions and after step actions. After step actions are executed always. Connector action are only executed if their connector was the path the Process instance went.
Harry
Is it correct that a step should only enter the pending status if there is a before-step rule? It seems that having only a before-step action also makes the step pending until the 'Pending Tasks' job executes.
Work-Relay Administrator
A before-step action makes the step pending if it's the first step in a process, otherwise it will process upon completion of the prior step. Other scenarios that put a step into pending status are 1) step uses a Start Date Config setting to delay activation until a specified time event, 2) if one or more constraints are on a step and the process is waiting for other branches to complete.