Advanced Features
Condition Priorities

Condition Priorities

By default in Rulebricks, conditions are evaluated in the order they are defined in the decision table, from top to bottom, and the first condition row where every comparison is satisfied is the one that is used to calculate the result of the rule.

But in some more complex scenarios, you may want a single decision table, but certain subgroups of conditions to take precedence over others. This is where condition priorities come in.

Priorities allow you to specify arbitrary subgroup "flights" of conditions that should be evaluated before others. This is useful when you have a set of conditions that should be evaluated first, and only if none of those conditions are met, should the other conditions be evaluated, and so on.

Setting priorities

To set condition priorities, open the Row Settings menu for the condition row you want to set a priority for, and set a priority number. Higher numbers are evaluated first, and lower numbers are evaluated later. If two rows have the same priority, they are evaluated in the order they appear in the decision table, but in isolation, as if all rows with lower priority numbers do not exist, and so on.

Settings Menu

Row priorities cannot be configured if a row is already a member of a group. If you want to set a priority for a row that is already a member of a group, you must first ungroup the row, set the priority, and then regroup the row. Alternatively, you can set the priority for the group itself, which will apply to all rows in the group.

After you've set priorities for your rows, you can see the priority number in the row itself, in the indicators on the left.

Priority Indicator

You might note a new symbol in the row indicator in the above image– a little clock icon. This indicates if a particular condition is in or out of schedule, which we'll cover in the next section.