[rules-users] Clearing an AgendaGroup

Michael Anstis michael.anstis at gmail.com
Wed Jan 26 13:28:34 EST 2011


Were the rules in Agenda Group "group1" executed, or merely evaluated?

Agenda Group controls which activations on the agenda are executed, rules in
all Agenda Groups will continue to be evaluated.

Thanks,

Mike

On 26 January 2011 10:52, Evert Penninckx <evert.penninckx at gmail.com> wrote:

>
> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110126/3936cff8/attachment.html 


More information about the rules-users mailing list