title: Drools Activation Group looping
body: <p>In my scenario I have two excel spread sheets (sheet1 and sheet2) which hold two separate decision tables.
  In sheet1, the the rule looks like:</p>
  
  <pre><code>PRIORITY 0
  NO-LOOP TRUE
  ACTIVATION-GROUP Group1
  AGENDA-GROUP Agenda1
  
      a  b | d
      1  2 | 1
  </code></pre>
  
  <p>So, if a == 1 and b == 2, set d to 1 
  The command to set d is: <code>modify(input) {setD(1)}</code></p>
  
  <p>Sheet2 looks like the following:</p>
  
  <pre><code>PRIORITY 5
  NO-LOOP TRUE
  ACTIVATION-GROUP Group1
  AGENDA-GROUP Agenda1
  
      a  c | d
      1  3 | 1
  </code></pre>
  
  <p>Both files have the same ACTIVATION-GROUP (activation1) and the same AGENDA-GROUP (agenda1)</p>
  
  <p>I use the input of:</p>
  
  <pre><code>a  b  c  d
  1  2  3  -2
  </code></pre>
  
  <p>I expect an activation to be created for each of the two rules. The rule with the higher priority will fire, and then because it is in an activation group, the second rule will be cancelled.</p>
  
  <p>However, when I run, the rule in Sheet1 will get activated and run, and then the rule in Sheet2 will get activated and run, and this will loop infinitely. </p>
  
  <p>To get an idea, here is a portion of the log output generated by the session: </p>
  
  <pre><code>==&gt;[ActivationCreatedEvent: getActivation()=[[ RuleId15010_16 active=false ] 
  ==&gt;[BeforeActivationFiredEvent:  getActivation()=[[ RuleId15010_16 active=false ]
  ==&gt;[AfterActivationFiredEvent: getActivation()=[[ RuleId15010_16 active=false ] 
  ==&gt;[ActivationCreatedEvent: getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[BeforeActivationFiredEvent:  getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[AfterActivationFiredEvent: getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[ActivationCreatedEvent: getActivation()=[[ RuleId15010_16 active=false ] 
  ==&gt;[BeforeActivationFiredEvent:  getActivation()=[[ RuleId15010_16 active=false ]
  ==&gt;[AfterActivationFiredEvent: getActivation()=[[ RuleId15010_16 active=false ] 
  ==&gt;[ActivationCreatedEvent: getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[BeforeActivationFiredEvent:  getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[AfterActivationFiredEvent: getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[ActivationCreatedEvent: getActivation()=[[ RuleId15010_16 active=false ] 
  ==&gt;[BeforeActivationFiredEvent:  getActivation()=[[ RuleId15010_16 active=false ] 
  ==&gt;[AfterActivationFiredEvent: getActivation()=[[ RuleId15010_16 active=false ] 
  ==&gt;[ActivationCreatedEvent: getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[BeforeActivationFiredEvent:  getActivation()=[[ RuleId15011_16 active=false ] 
  ==&gt;[AfterActivationFiredEvent: getActivation()=[[ RuleId15011_16 active=false ] 
  </code></pre>
  
  <p>I have already broken the rules into two seperate AGENDA-GROUPs, which is a solution, but I would like to know why the activate-group is not doing what I thought it should do.</p>
  
  <p>Does anyone have any ideas why this is looping infinitely?</p>