[rules-users] How to run an agenda group multiple times?

Wolfgang Laun wolfgang.laun at gmail.com
Mon Nov 14 07:08:56 EST 2011


Consider this scenario:
  insert facts, rules r, s, t in group G are activated
  set focus for agenda group G
  set focus for agenda group G
  fireAllRules
  rules r, s fire
  rule t fires and inserts a fact so that rule u in G is activated
  rule u fires
  G is popped from the stack - no more rules in G are activated
  G is popped from the stack - no rules in G are activated

Two immediately successive pushes of the same agenda group are useless.

-W

On 14 November 2011 12:52, Zhao Yi <zhaoyi0113 at gmail.com> wrote:

> According to Drools export document,
>
> *Each time setFocus() is called it pushes that Agenda Group onto a stack.
> When the focus group is empty it is popped from the stack and the focus
> group that is now on top evaluates. An Agenda Group can appear in multiple
> locations on the stack. *
>
> If I run setFocus() on an agenda group two times, the agenda group should
> be
> in multiple locations on the stack, why the rules in this agenda group are
> fired only once?
>
> Thanks,
> Zhao Yi
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-run-an-agenda-group-multiple-times-tp3504139p3506610.html
> Sent from the Drools: User forum 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/20111114/3ab0dc7e/attachment.html 


More information about the rules-users mailing list