The operator for test for equality is "==", not "=".
It#s better to write this so:
$E: ( MyEvent(prop == "1" || == "2" || == "3" )
MyEvent(prop = "4")
MyEvent(prop = "5")
-W
Hi, I've to write a rule in which there are multiple and, or conditions. Like
(
MyEvent(prop = "1")
or
MyEvent(prop = "2")
or
MyEvent(prop = "3")
)
and
MyEvent(prop = "4")
and
MyEvent(prop = "5")
I tried to implement it like
$E: (
MyEvent(prop = "1")
or
MyEvent(prop = "2")
or
MyEvent(prop = "3")
)
MyEvent(prop = "4")
MyEvent(prop = "5")
but it's throwing error expecting ')'.
Can anyone please help me writting this rule?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Implementing-multiple-and-or-conditions-tp2328123p2328123.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users