[rules-users] Action

Mauricio Salatino salaboy at gmail.com
Wed Dec 21 12:15:27 EST 2011


To add to Michael,
Insert/Update/Retract


2011/12/21 Michael Anstis <michael.anstis at gmail.com>:
> Just to add to what salaboy wrote, *all* LHS are evaluated as Facts are
> inserted.
>
> If I am not mistaken, ruleflow-group (like agenda-group) only controls what
> activations (RHS) on the agenda caused by the evaluation of the LHS are
> executed.
>
>
> On 21 December 2011 15:24, Mauricio Salatino <salaboy at gmail.com> wrote:
>>
>> Hi,
>> if you use the from expression it will get evaluated each time that
>> anything in the session change (at least in your example).
>> So you can insert all the NikeShoes from the service you are calling
>> into the working memory and those rules will be only evaluated when a
>> NikeShoe is modified or inserted. Using ruleflow-groups do not prevent
>> the evaluation from the other rules, it just prevent those rules to
>> fire.
>>
>> Cheers
>>
>> 2011/12/21 Alan Ma <ama at spectrumk12.com>:
>> > Hi Drools Rulers,
>> >
>> >
>> >
>> > I am new to drools and I’ve configured a rule with the following:
>> >
>> > ------------------------------------------------------------------------
>> >
>> > rule "my rules"
>> >
>> >     ruleflow-group "nike"
>> >
>> >     no-loop true
>> >
>> >     when
>> >
>> >         $nikeShoe : NikeShoe() from shoeManager.getNikeShoe(xxxx)
>> >
>> > then
>> >
>> >    xxxx
>> >
>> > end
>> >
>> > ------------------------------------------------------------------------
>> >
>> >
>> >
>> > When I run rule group “Adidas”, the getNikeShoe() query in group “nike”
>> > is
>> > executed. Although I did NOT invoke the rule group “nike” when executing
>> > rules, the shoeManager. getNikeShoe () call is always executed. Seems
>> > somehow the condition is pre-checked by drools somehow. Anyone could
>> > please
>> > share what I did wrong? I definitely don’t want to invoke group “nike”
>> > when
>> > executing group “Adidas”.
>> >
>> >
>> >
>> > Thanks in advance!
>> >
>> >
>> >
>> > Alan M.
>> >
>> >
>> >
>> >
>> > ________________________________
>> > CONFIDENTIALITY NOTICE: The information contained in this message is
>> > intended only for the recipient and may contain information that is
>> > confidential. If you are not the intended recipient or an employee or
>> > agent
>> > responsible for delivering this message to the intended recipient;
>> > please be
>> > aware that any dissemination, forwarding, printing, copying, disclosure
>> > or
>> > distribution of this communication is strictly prohibited. If you have
>> > received this communication in error, please immediately notify the
>> > sender
>> > by replying to the message and deleting all copies, including
>> > attachments,
>> > from your system.
>> >
>> > _______________________________________________
>> > rules-users mailing list
>> > rules-users at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>> >
>>
>>
>>
>> --
>>  - CTO @ http://www.plugtree.com
>>  - MyJourney @ http://salaboy.wordpress.com
>>  - Co-Founder @ http://www.jugargentina.org
>>  - Co-Founder @ http://www.jbug.com.ar
>>
>>  - Salatino "Salaboy" Mauricio -
>>
>> _______________________________________________
>> 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
>



-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -




More information about the rules-users mailing list