The Engine unpends the rule according to whether the rule specifies iterative decisions.
For Rules Without Iterative Decisions
Consider the following rule:
rule "rule1"
decision "main"
eval A
then
case = B:
do X=C Y=D end
case >= 10:
decision next
end
decision "next"
eval E
then
case = F:
do X=G Y=H end
end
In cases where the rule thread is pended on a premise reference, other premise fields (including those in other decisions) may be relevant for unpending:
If the thread pended on a reference to A, the Engine unpends the thread only on resolution of A. The thread's active decision remains main.
If the thread pended on a reference to B, the Engine unpends the thread on either resolution of B or a value change for A. The thread's active decision remains main.
If the thread pended on a reference to E, the Engine unpends the thread on either resolution of E or a value change for A or B. If E is resolved, the thread's active decision remains next. If A or B change value, the active decision becomes main.
If the thread pended on a reference to F, the Engine will unpend the thread on either resolution of F or a value change for A, B or E. If F is resolved or E changes value, the thread's active decision remains next. If A or B change value, the active decision becomes main.
Note: As a result of unpending a thread, the Engine may also redefine the active decision for the thread.
For Rules With Iterative Decisions
Unpending for rules with iterative decisions is very similar to rules without iterative decisions, except that only fields referenced since the latest iteration are relevant for unpending.
Consider the following rule:
rule "rule1"
decision "main"
eval A
then
case = B:
do X=C Y=D end
case >= 10:
decision next
end
decision "next"
for p in Person
eval p.E
then
case = p.F:
do X=p.G Y=p.H end
end
If the thread is premise-pended on p.E or p.F, the Engine unpends the thread only as those fields are resolved or change value. In that case, the thread's active decision remains next.
Note: The thread does not unpend as any of the premise references for earlier decisions change value. Likewise, the Engine ignores any changes in the membership of class Person.
| Copyright © 2009 CA. All rights reserved. | Email CA Technologies about this topic |