yes.. you need to set the attribute lock-on-active to avoid looping between these two rules :)<div>This is true if you are calling update/modify in the RHS of the rules<br><div><div>Hope it helps<br><div><br><div class="gmail_quote">
On Mon, Sep 19, 2011 at 2:36 PM, skasab2s <span dir="ltr">&lt;<a href="mailto:skasab2s@smail.inf.fh-brs.de">skasab2s@smail.inf.fh-brs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
I have a rule file with multiple boolean variables. Currently, I declare a<br>
new wrapper object for every single variable<br>
<br>
/declare Object1<br>
  value : boolean<br>
end<br>
<br>
declare Object2<br>
  value : boolean<br>
end<br>
/<br>
<br>
The approach works fine, but when I try wrapping the two variables in one<br>
object a not desired effect happens: see code:<br>
<br>
/declare ObjectOneTwo<br>
  value1 : boolean<br>
  value2 : boolean<br>
end<br>
<br>
rule &quot;first rule&quot;<br>
  when<br>
      ObjectOneTwo (value1 == false)<br>
  then<br>
      set ObjectOneTwo.value1 to &#39;true&#39;<br>
  end<br>
<br>
rule &quot;second rule&quot;<br>
  when<br>
     ObjectOneTwo (value2 == false)<br>
 then<br>
    set ObjectOneTwo.value2 to &#39;true&#39;  /<br>
 end<br>
In the second rule, we modify the same object ObjectOneTwo again which<br>
causes &quot;fist rule&quot; to fire again although this is not desired. Do you know<br>
how to avoid this effect and still have one wrapper object for all<br>
variables?<br>
<br>
Thanks in advance!<br>
<br>
Svetlomir.<br>
<font color="#888888"><br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Multiple-variables-problem-tp3349281p3349281.html" target="_blank">http://drools.46999.n3.nabble.com/Multiple-variables-problem-tp3349281p3349281.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br> - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div>
- Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br> - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div>
<br>
</div></div></div></div>