[rules-users] Drools Flow: Skipping some LHS evaluations at time of insert

madchen k.cheung at accenture.com
Thu Apr 8 11:24:58 EDT 2010


Okay so correct me if I'm wrong, but what you're suggesting is something like
this:

rule "1"
	when
		$v :variable(blah = "matches")
		$co : controlObject
	then
		System.out.println("Yay it matched")
		$co.setDoneTrue
end

rule "2"
	when
		$v2 :variableTwo(blah = "matches")
		$co : controlObject(done != True)
	then
		//do some stuff
end

So basically, when the first rule activates and fires, it sets the
controlObject.done to true and then the second rule will not fire because
done is true. In this case, it seems that drools will run through the tests
for each rule and match it against the control object.

Basically, I'm looking to improve the performance of Drools and in my case,
if it matches one rule, then there would be no reason to check the other
ones. Therefore, I'm trying to not have drools check every rule against
every object.
-- 
View this message in context: http://n3.nabble.com/Drools-Flow-Skipping-some-LHS-evaluations-at-time-of-insert-tp704324p706256.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list