[rules-users] [Drools4]: Filter executed rules by *.drl file

magendo robert.heisenberg at yahoo.com
Tue Jul 19 11:25:29 EDT 2011


magendo wrote:
> 
> 1. Using a contextObject which has foo and is checked in the first rule of
> each rulepackage. This first rule and the remaining rules in the
> rulepackage have the same agenda group. So if the first rule doesnt fit,
> the other rules wont be executed, either (does this really work? ;)).
> 

Well, that doesnt even seem to work. Here are 2 examples I tried out:

rule "one"
auto-focus
agenda-group "foobar"
when 
 foo != bar
then
 drools.getWorkingMemory().clearAgendaGroup("foobar");
end

rule "all the other rules"
agend-group "foobar"
when some conditions
then some consequences
end

This way the "some conditions" part is still executed in the lhs of "all the
other rules", altough I cleared the agendagroup "foobar" (I guess that
happens because the rhs is only executed after fireallrules()).

There must be a way to affect the lhs of the other rules before
fireallrules() is executed?!

Btw. my LHS is quite expensive thats why I dont wont to execute it 100 times
when only the right one is needed.




--
View this message in context: http://drools.46999.n3.nabble.com/Drools4-Filter-executed-rules-by-drl-file-tp3182568p3182842.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list