You can add an instance of Integer or an extension of Integer, perhaps
a class called StateId, to working memory. Initially set it to1. Add a
condition to each rule to test if the StateId is equal to each rule's
order in the sequence. Add a statement to the action part of each rule
to increment the StateId.
This is a general technique that can be used to manage transitions in a
state machine. The condition parts of rules use StateId to tell which
state the rules apply to and the rest of the condition parts determine
whether to transition to another state or not. The action parts of the
rules modify StateId to execute the transition.
Kapila Silwathge [11/11/2008 12:44 AM] wrote:
Dear All,
I need to run about 10 rules sequentially.
When it comes up to 4th rule it modifies the fact. But it should only
re-activate only the 5th rule onwards. Already ran rules(1,2 and
3[anyway 4th wont run when you set no-loop to true]) should be intact.
How can I do this?
Pls HELP
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users