Rule Machine Evaluation/Execution Enhanced Documentation

There is much less to this than you might think:

The order is super simple:

  • For a rule: condition event occurs, rule is evaluated left to right, action is taken if rule-truth changed, either true actions or false actions as appropriate.
  • For a trigger: trigger event occurs, action is taken.
  • For a triggered rule: trigger event occurs, rule is evaluated left to right, action is taken for true or false as appropriate.

The order of actions you reference in the wiki simply gives the order in which the actions of a single rule would happen when there are multiple actions. This is usually not relevant as most rules have only one or two actions, and generally their relative order is unimportant. However, there are a couple of subtle ordering issues: capture is done prior to anything that changes devices that might be captured, and restore is done after. Private Booleans are set before other actions on other rules.

Except for order of actions, all of this is explained in the Rule Machine introduction.