[rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

Edson Tirelli ed.tirelli at gmail.com
Thu Jan 21 12:20:53 EST 2010


   LOL, by "jeopardize the intention of the developer" you mean  "guess what
the developer wanted to do but didn't know how to model" or more like "teach
the developer how to use a stack"? :)

   Seriously, there is a reason why stacks work like they do and why
agenda-groups are handled as stacks. You can try to use ruleflow-groups
instead of agenda-groups, if you want to coordinate your rules in a more
straight forward (I guess we could say more natural, sequential) way.
Although, even with ruleflow-groups, you need to model them in the correct
order or things will not go as you would like them to.

   Edson


2010/1/21 Pritam <infinity2heaven at gmail.com>

>
> I set
> session.getAgenda().getAgendaGroup("group1").setFocus();
> session.getAgenda().getAgendaGroup("group2").setFocus();
>
> and only group1 rule fires, but when I set
> session.getAgenda().getAgendaGroup("group2").setFocus();
> session.getAgenda().getAgendaGroup("group1").setFocus();
>
> both group1 and group2 rules are fired.
>
> It looks like setfocus internally is adding to the stack "in the order in
> which it is called."
>
> It would be nice to have a addfocus instead that doesn't jeopardize the
> intention of the developer.
> --
> View this message in context:
> http://n3.nabble.com/Understanding-agenda-group-doesn-t-work-as-documented-in-book-or-docs-tp133386p133424.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
>



-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100121/dfb47c98/attachment.html 


More information about the rules-users mailing list