[rules-users] expert: usage of ruleflow-groups

Wolfgang Laun wolfgang.laun at gmail.com
Wed May 5 01:40:22 EDT 2010


2010/5/5 miguel machado <mls.machado at gmail.com>:
> Hi,
> First of all, thank you both for your answers.
>
> @Wolfgang:
> My problem is that i cannot have the different rule groups stacked. I may do
> as you suggested, but i'll have rules firing from other agenda-groups after
> the first agenda-group activations are all gone (because they go into the
> stack as well, right?).

No, no, no! Nothing goes on the stack unless you setFocus()!

What i'm looking for is a way to isolate the
> execution and just fire the rules within a specific set (aka just one
> group). Does this make any sense?

This is *exactly* what my sketchy statement sequence does, in
an existing application.
-W

> Thank you for your support. I appreciate all the help i can get.
> _ miguel
>
>
>
> On Tue, May 4, 2010 at 4:46 PM, Wolfgang Laun <wolfgang.laun at gmail.com>
> wrote:
>>
>> I've been using agenda groups without any trouble for a similar problem,
>> doing
>>  setFocus( ... );
>>  insert( ... );... insert( ... );
>>  fireAllRules();
>> repeatedly.
>>
>> You don't have to be afraid of the focus stack growing indefinitely:You
>> control
>> the "push" (setFocus()), and if an agenda group's activations are all
>> gone, the
>> group is automatically popped from the stack.
>>
>> -W
>>
>> 2010/5/4 Miguel Machado <mls.machado at gmail.com>:
>> > Hi there,
>> > I'm having some trouble implementing the desired workflow of rule firing
>> > in
>> > an application using drools expert. I've read the thread about the
>> > difference between ruleflow groups and agenda groups, but it is still
>> > unclear to me how to achieve what i need.
>> > What i intend to have is the ability to fire a specific set of rules
>> > according to the object i'm inserting into the ksession.
>> > I do not want to use agenda-groups because it stacks all the agenda
>> > groups
>> > declared on the rule file (as far as i understand) and therefore it may
>> > fire
>> > activations i do not want to be fired. Instead, i want to isolate them
>> > completely. I tried using ruleflow groups for this, but i cannot find a
>> > way
>> > to activate a specific group programmatically, before calling
>> > fireAllRules(), the way i can with agenda-groups (setFocus() method).
>> > That being said, i'm asking for help in trying to use either one of
>> > ruleflow/agenda groups or even both in order to get things working the
>> > way i
>> > described.
>> > Thanks in advance,
>> > _ miguel
>> >
>> > _______________________________________________
>> > rules-users mailing list
>> > rules-users at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>> >
>> >
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> --
> "To understand what is recursion you must first understand recursion"
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>




More information about the rules-users mailing list