> For the complete documentation index, see [llms.txt](https://docs.work-relay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.work-relay.com/processes/process-actions/rules-and-actions-execution-sequence-and-mechanics.md).

# Rules and actions execution sequence and mechanics

The sequence of execution is the following:

1. **Connector conditions**\
   Connector conditions determine the connector to follow. If several connectors qualify, the highest-order connector is used. Configure this order in the step's **Connector** tab.
2. **Step validation rules**\
   If a rule is triggered, an error is shown. The process cannot continue.
3. **Step actions**\
   Step actions run regardless of the connector selected.
4. **Connector actions**\
   Connector actions run on the selected connector.
5. **Before Step rules**\
   Before Step rules run for the next step.
6. **Before Step actions**\
   Before Step actions run for 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.
