[rules-users] fireUntilHalt and timing of rule activations

Norman C rent_my_time at yahoo.com
Sat Oct 2 11:22:20 EDT 2010


Hi All,

In my app, I have a separate thread calling fireUntilHalt() continuously.  I 
have quite a few rules, and I am using salience extensively to control the order 

in which rules are executed.  What I have seen (by adding an event listener) is 
that as a new fact is inserted, various rules are activated.  Often, the 
fireUntilHalt will start executing fireNextItem in DefaultAgenda before all of 
the activations are complete.  So if the rule with the highest salience 
value hasn't been activated at this point, then the first rule to be fired isn't 

the correct one.

This can be worked around by waiting for insert to return and then calling 
fireAllRules().  But it seems like the session should block fireUntilHalt from 
trying to execute activated rules until all activations are complete.  Or am I 
missing something here?

thanks,
Norman


      





More information about the rules-users mailing list