The effect you describe should only happen if you do not modify/update the <br>ObjectOneTwo in the consequence.<br><br>Posting pseudo-code that doesn't show what you really have in your rules doesn't help.<br><br>-W<br>
<br><br><br><br><div class="gmail_quote">On 19 September 2011 19:36, skasab2s <span dir="ltr"><<a href="mailto:skasab2s@smail.inf.fh-brs.de">skasab2s@smail.inf.fh-brs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; 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 "first rule"<br>
when<br>
ObjectOneTwo (value1 == false)<br>
then<br>
set ObjectOneTwo.value1 to 'true'<br>
end<br>
<br>
rule "second rule"<br>
when<br>
ObjectOneTwo (value2 == false)<br>
then<br>
set ObjectOneTwo.value2 to 'true' /<br>
end<br>
In the second rule, we modify the same object ObjectOneTwo again which<br>
causes "fist rule" 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>