The operator for test for equality is "==", not "=".<br><br>It#s better to write this so:<br>$E: ( MyEvent(prop == "1" || == "2" || == "3" )<br>MyEvent(prop = "4")<br>
MyEvent(prop = "5")<br><br>-W<br><br><div class="gmail_quote">On 25 January 2011 11:52, Ayush <span dir="ltr"><<a href="mailto:ayush.vatsyayan@alcatel-lucent.com">ayush.vatsyayan@alcatel-lucent.com</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;"><br>
Hi, I've to write a rule in which there are multiple and, or conditions. Like<br>
(<br>
MyEvent(prop = "1")<br>
or<br>
MyEvent(prop = "2")<br>
or<br>
MyEvent(prop = "3")<br>
)<br>
and<br>
MyEvent(prop = "4")<br>
and<br>
MyEvent(prop = "5")<br>
<br>
I tried to implement it like<br>
<br>
$E: (<br>
MyEvent(prop = "1")<br>
or<br>
MyEvent(prop = "2")<br>
or<br>
MyEvent(prop = "3")<br>
)<br>
MyEvent(prop = "4")<br>
MyEvent(prop = "5")<br>
<br>
but it's throwing error expecting ')'.<br>
<br>
Can anyone please help me writting this rule?<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Implementing-multiple-and-or-conditions-tp2328123p2328123.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Implementing-multiple-and-or-conditions-tp2328123p2328123.html</a><br>
Sent from the Drools - User 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>