>Not true...If I remove Rule 2 and change the attribute on Rule 1 to no-loop<br>
>true, I still get infinite loop. The rule will process board 5, then board<br>
>4, then back to board 5.<br>it is because stack is part of both tuples ([stack, board5], [stack, board4]). <br>if rule 1 fires it updates both tuples. The current one will be ignored but the other one won't which causes recursion.<br>
<br>This is my understanding. Maybe somebody else could confirm/deny.<br><br>Greg's solution would work just fine. The only issue I have with it is that the business requirements usually specify A, B and C. They don't specify 'not D'. It is there only to make our rules work, which is not ideal. Just my 2c.<br>
<br><br><div class="gmail_quote">On Wed, Jan 28, 2009 at 6:21 PM, Greg Barton <span dir="ltr"><<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">--- On Wed, 1/28/09, Dan Seaver <<a href="mailto:dan.seaver@ge.com">dan.seaver@ge.com</a>> wrote:<br>
<br>
> Yes, I understand why Rule 2 doesn't fire when the attribute is set to<br>
> lock-on-active, but why does no-loop work with Rule 2, but not with Rule<br>
> 1?<br>
<br>
</div>Just to jump in here, let me say this: I have no idea. :)<br>
<br>
Now a suggestion...<br>
<br>
This is one reason I like to primarily rely on the rule conditions to control activation. i.e. rules look like this:<br>
<br>
when<br>
A, B, and C<br>
but not D [D is performed in rule action]<br>
then<br>
do D<br>
end<br>
<br>
It's self documenting, though does require more maintenance, as you may have to change the rule condition whenever you change the rule action.<br>
<br>
The tools drools provides for activation control are general purpose, and as such are necessarily the sledgehammer approach. :) Nothing wrong with that per se, I just prefer the a more fine grained approach, and the extra control that provides.<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>