Each stage in the life cycle of a rule can have multiple causes and effects. By writing and including expressions within life cycle actions (as defined by the <lifeCycleActions> element), a rule writer can define the actions to take at each stage.
The activation and deactivation stages can occur multiple times in the life cycle of a rule, but the load and unload stages occur only once.
Table 1 lists the causes and effects of each life cycle stage.
Life cycle stage | Causes | Effects |
---|---|---|
Load | Any of the following circumstances:
|
The actions within the <onLoad> element run. |
Activation | The rule is activated. A rule can be activated in any
of the following ways:
|
If the rule is inactive, the actions within the <onActivation> element run. |
Deactivation | The rule is deactivated. A rule can be deactivated in
any of the following ways:
|
If the rule is active, the actions within the <onDeactivation> element run. |
Unload | Any of the following circumstances:
|
If the rule is active, the actions within the <onDeactivation> element run, followed by the actions within the <onUnload> element. Otherwise, only the actions within the <onUnload> element run. |