Title: Rules firing in an endless loop...
We have a thread set up specifically for Jess.runUntilHalt().
 
In a different thread, we have things definstanced into the fact base.
 
We have two rules in question.  One has a higher salience than the other.  It appears that the lower salience rule is firing about 50% of the time.  So it appears to us that salience isn't being checked as we would guess.
 
We turned off run-until-halt, definstanced the objects and did an agenda.  The lower salience activation has a smaller time associated with it.  My guess is that the waitForActivations() call to runUntilHalt is being returned before the higher salience rule is activated.  So the lower salience rule fires, then we wait for activations again and then the higher salience rule is fired.
 
Is the time on the activation what I think it is?...the time that the activation was triggered.
Does waitForActivations return as soon as there is one activation?
 
Does anyone have a suggestion?  We're thinking about doing away with salience and using more predicates, but that would be painful for us as we've used salience across the board and made some assumptions based on that.
 
Scott

Reply via email to