yes.. you need to set the attribute lock-on-active to avoid looping between
these two rules :)
This is true if you are calling update/modify in the RHS of the rules
Hope it helps
On Mon, Sep 19, 2011 at 2:36 PM, skasab2s <skasab2s(a)smail.inf.fh-brs.de>wrote:
Hello,
I have a rule file with multiple boolean variables. Currently, I declare a
new wrapper object for every single variable
/declare Object1
value : boolean
end
declare Object2
value : boolean
end
/
The approach works fine, but when I try wrapping the two variables in one
object a not desired effect happens: see code:
/declare ObjectOneTwo
value1 : boolean
value2 : boolean
end
rule "first rule"
when
ObjectOneTwo (value1 == false)
then
set ObjectOneTwo.value1 to 'true'
end
rule "second rule"
when
ObjectOneTwo (value2 == false)
then
set ObjectOneTwo.value2 to 'true' /
end
In the second rule, we modify the same object ObjectOneTwo again which
causes "fist rule" to fire again although this is not desired. Do you know
how to avoid this effect and still have one wrapper object for all
variables?
Thanks in advance!
Svetlomir.
--
View this message in context:
http://drools.46999.n3.nabble.com/Multiple-variables-problem-tp3349281p33...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)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 -