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.) <manstis1@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-bounces@lists.jboss.org
[mailto:rules-users-bounces@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.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