Content:
1. What Is Execution Order in the Context of Business Rules?
2. Practical Examples of Using Execution Orders
This article focuses on the order in which business rules are executed. Please refer to our Business rules guide to get started on the topic.
1. What Is Execution Order in the Context of Business Rules?
With the Business Rules Execution Order feature, you can instruct the system in what order to execute Business rules that have a similar trigger action. If 2 or more rules have a matching trigger action, they will be executed in ascending order (1, 2, 3).
Important: Only Account Owners can adjust the rules' execution order.
You can see an overview of the execution order of the Business Rules from the administration panel business rule tab.
By default, when you create a new rule, it will be assigned with the last execution order available. You can change that manually via the rule configuration by inputting the desired number OR via the main business rules window by dragging and dropping a rule before or after another one.
Note: Using the drag+drop method would be possible only if the rules are not sorted/filtered and that would include accessing the rules section for a given column/lane from the board policies.
2. Practical Examples of Using Execution Orders
A practical example of having to configure the execution order is when you have two rules with the same trigger in the same location (e.g. a card is created on board “Support”).
- Rule 1: When the card is created on board "Support", set its color to Red — the execution order is 1.
- Rule 2: When the card is created on board "Support", set its color to Blue — the execution order is 2.
Without the execution order, the system does not know which rule to trigger first so the execution order of those two rules would be random, i.e. the card can be colored in Red or Blue.
With the help of the Execution Order, the lower number rule will trigger first (execution order 1) - when the card is created, it will turn red, and then the other rule will execute afterward (execution number 2), so the card's final color would be blue.
Opening the card's history tab should show two events for the two separate rules triggering on the card, so you can validate if the execution order works as intended.