[rules-users] Clearing an AgendaGroup

Evert Penninckx evert.penninckx at gmail.com
Wed Jan 26 05:52:53 EST 2011


Hi

I have a rule set with two agenda groups. I have a rule with autofocus on
group1. If the rules in group1 are "exhausted" it activates group2 using
setFocus(). 

rule "Active second group"
agenda-group "group1"
auto-focus true
salience -1
when
  eval(true)
then
  drools.setFocus("group2")
end

Now I noticed that while executing rules from group2, rules from group1 were
still being triggerd and executed. 

So I added this to the then clause.

drools.getWorkingMemory().getAgenda().clearAndCancelAgendaGroup("group1")

Alas, it made no difference. Some debugging made clear that after the then
clause the stack contained only MAIN and "group2". 

Am I missing some basic notion on agenda groups?




Greetz

Evert

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Clearing-an-AgendaGroup-tp2353014p2353014.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list