Correct. This is explained in the manual. All production rules rete-based
engines work like this, executing the rule consequence once for each logical
branch.
[]s
Edson
2009/6/8 Anstis, Michael (M.) manst...@ford.com
I believe the answer is that Drools implements sub-rule compilation for
rules containing or.
So in essence your rulebase contains the following once compiled:-
rule fire_twice_a
no-loop true
when
eval(true)
then
System.out.println(word);
end
rule fire_twice_b
no-loop true
when
eval(true)
then
System.out.println(word);
end
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of
sergey.olifirenko
Sent: 08 June 2009 13:39
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] OR operator affects how many times Rule's
actionis executed
More simple example:
package continuated_rules
dialect mvel
rule fire_twice
no-loop true
when
eval(true) or eval(true)
then
System.out.println(word);
end
output is:
word
word
why does it happens ?
--
View this message in context:
http://www.nabble.com/OR-operator-affects-how-many-times-Rule%27s-action
-is-executed-tp23910106p23923259.htmlhttp://www.nabble.com/OR-operator-affects-how-many-times-Rule%27s-action%0A-is-executed-tp23910106p23923259.html
Sent from the drools - user mailing list archive at Nabble.com.
___
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
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users