[rules-users] Implementing multiple 'and' 'or' conditions

Wolfgang Laun wolfgang.laun at gmail.com
Tue Jan 25 05:56:21 EST 2011


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

On 25 January 2011 11:52, Ayush <ayush.vatsyayan at alcatel-lucent.com> wrote:

>
> 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110125/9cff41f9/attachment.html 


More information about the rules-users mailing list