Actually, your "threshold" rule shouldn't fire at all in a stateless session, where<br>everything is evaluated just once, resulting in a fixed set of activations (and,<br>at most from these, firings). What you reported, sounds very fishy, indicating<br>
a bug - I'm not saying where ;-) Either check with the latest version of Drools,<br>or post the minimal code showing the effect. <br><br>In a stateFUL session, activations are added to the agenda as soon as they<br>become manifest, and are removed as soon as a rule's condition fails. So,<br>
a single change could create any number of activations. Ranking within<br>the agenda is determined by several things, salience being the major<br>criterion. <br><br>The current online version of the documentation deals with these topics in several<br>
places: <a href="http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch02.html#d0e240">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch02.html#d0e240</a>, <a href="http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch03.html#d0e1797">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch03.html#d0e1797</a> (see subsection "Sequential Mode"), <a href="http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch03.html#d0e1560">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch03.html#d0e1560</a><br>
<br>-W<br><br><br><div class="gmail_quote">On Mon, May 18, 2009 at 8:25 PM, David Boaz <span dir="ltr"><<a href="mailto:davidb@dbmotion.com">davidb@dbmotion.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;">
<br>
Thanks Wolfgang,<br>
<br>
I understand your answer. But, still I cannot understand why low salience on<br>
the threshold rule was not enough?<br>
Does drools run all the activations in the agenda in one block, and then<br>
match the changed facts and create new activations? or does the matching<br>
happen immediatly after each change?<br>
<br>
Thanks again, David<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/rule-with-low-Salience-is-fired-too-early-tp23585593p23602875.html" target="_blank">http://www.nabble.com/rule-with-low-Salience-is-fired-too-early-tp23585593p23602875.html</a><br>
Sent from the drools - user mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>