[rules-users] Multiple variables problem..

Mauricio Salatino salaboy at gmail.com
Mon Sep 19 14:07:09 EDT 2011


so lock-on-active will help.. you should add that in both rules
rule "one"
   lock-on-active
   then
     ...
   when
end

On Mon, Sep 19, 2011 at 3:05 PM, skasab2s <skasab2s at smail.inf.fh-brs.de>wrote:

> Thanks for the reply. This is the full code:
>
> /declare ObjectOneTwo
>  value1 : boolean
>  value2 : boolean
> end
>
> rule "first rule"
>  when
>       $objectOneTwo : ObjectOneTwo (value1 == false)
>  then
>      $objectOneTwo.setValue1(true);
>      update($objectOneTwo);
>   end
>
> rule "second rule"
>  when
>      $objectOneTwo : ObjectOneTwo (value2 == false)
>  then
>       $objectOneTwo.setValue2(true);
>      update($objectOneTwo); //<-- this is where "first rule" fires once
> again (not desired for me and that's the problem)
>  end
> /
>
>
> Thanks
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Multiple-variables-problem-tp3349281p3349377.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
>



-- 
 - 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 -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110919/4b88a5e7/attachment.html 


More information about the rules-users mailing list