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