[rules-users] modify, retract, setFocus and Salience

gboro54 gboro54 at gmail.com
Fri Apr 27 09:50:38 EDT 2012


I will take a stab at answering this:
-Modify and Retract will cause the tree to be re-evaluated for the current
facts in memory. This may cause new activations or cancellations to occur.
Be forewarned that a rule that modifies a fact may cause a continuous loop
if the conditions for that rule are always satisfied. If you wish to not
have this behavior look at no-loop

-Salience: Can be useful but I have found that using a controller fact to
order execution is more efficient. The problem with Salience is that it can
cause your tree to become to linear thus the behavior of the rules engine is
more like a bunch of if statements rather then being able to match patterns
and fire. I do use salience for some rules but try not to over do it

-setFocus: I don't have anything wrong with this. This allows you to
segments your rules into agenda groups.

I am sure someone else on here can add more. 
-Mike


aps4u wrote
> 
> will these conditions make any trouble? waiting for a reply..
> 


--
View this message in context: http://drools.46999.n3.nabble.com/modify-retract-setFocus-and-Salience-tp3942799p3944319.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list