It would not be impossible to define a "first-rule-wins" group, where the first rule to fire may keep on doing so, locking out all others. But this is an incomplete definition; you'd also have to specify how long the lock-out effect should remain. If this isn't for the entire duration of the session, then what?
Not knowing the actual conditions and other details I cannot really make a positive statement, but there's some doubt in my mind whether the stated problem might not be solved by using "complete" conditions.
-W2010/12/17 Yaniv Itzhaki <iyaniv@gmail.com>Thanks for your helpI was looking for internal drools feature to solve this issue (this is what i meant by etc..).2010/12/16 Bruno Freudensprung <bruno.freudensprung@temis.com>
Hi,
I don't know if it is the best solution since I am very new to Drools but you could use a logical insert of a "Skip" fact. Something like:insertLogical(new Skip());
rule "A1"
salience 100
ruleflow-group "A"
activation-group "A"
when
xxx1
then
yyy1
endnot Skip()
rule "A2"
salience 90
ruleflow-group "A"
activation-group "A"
when
xxx2
then
yyy2
end
Bruno.
Yaniv Itzhaki a écrit :any ideas anyone?
On Thu, Dec 16, 2010 at 12:36 PM, Yaniv Itzhaki <iyaniv@gmail.com> wrote:
Hi,
I have a group of rules with salience which I would like that only the first activated rule will fire.
I cant use the activation-group attribute because each rule can fire number of times, and i want only this rule to be fired in that group:
rule "A1"salience 100ruleflow-group "A"activation-group "A"whenxxx1thenyyy1end
rule "A2"salience 90ruleflow-group "A"activation-group "A"whenxxx2thenyyy2end
If Rule A1 run (activated number of times), rule A2 should not run.
Is there a way to do that? (no global flags etc.)
ThanksYaniv
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users