Rule task ordering and RetePlus algorithm
Why are certain rules not firing when using Priority or Literal ordering, while the same rules are firing when using the Default ordering in a RetePlus rule task?
A first general answer is that a different order of execution of the rule actions may lead to a different state of objects in working memory in such a way that certain rules may be ineligible to fire, while they would be eligible after a different sequence of actions. But this document focuses on the more specific aspect of rule re-evaluation in relation with rule task ordering.
When a RetePlus rule task is configured with the Priority or Literal ordering (respectively sorted and literal IRL keywords), the rules are executed based on the specified order, but the rules are not re-evaluated. In particular, the execution of a rule action part may have side effects that would make another rule logically eligible to fire, but this rule may not fire if it was previously evaluated (based on specified ordering) and determined to be not eligible to fire. Only the Default ordering ( dynamic IRL keyword) leads to the creation of a RetePlus network with full agenda management. See in the product documentation the part "Table 2. Task ordering properties for RetePlus" in Execution properties for rule tasks
If rule re-evaluation is needed, the only combination of algorithm and ordering that should be used is RetePlus algorithm and Default ordering. Note that when this ordering is selected the dynamic priority of the rules is used (the IRL keyword "dynamic" stands for "dynamic priority") along with the refraction and recency principles that are part of the RetePlus algorithm execution strategy.
If Priority or Literal ordering is needed, it is recommended for better performance to use the Fastpath or Sequential algorithm instead of RetePlus. Starting with version 8 the use of the Priority or Literal ordering with RetePlus algorithm is deprecated, see Rule Task Properties.
|Business Integration||WebSphere ILOG JRules||Modules:Java Engine||Platform Independent||7.1.1, 7.1, 7.0.3, 7.0.2, 7.0.1, 7.0|
More support for:
IBM Operational Decision Manager
Software version: 7.5, 8.0, 8.5, 8.6
Operating system(s): Platform Independent
Reference #: 1643647
Modified date: 24 October 2013