[rules-users] Drools upgrade from 3 to 5 - '||' OR syntax
Edson Tirelli
ed.tirelli at gmail.com
Wed Mar 24 14:36:46 EDT 2010
That syntax was deprecated. Use "or" and "and" between patterns, and use
"&&" and "||" inside patterns between constraints. Also, the single binding
for "or" uses () if I am not mistaken:
core : ( BWCore(systemId == "1" ) or
BWCore(systemId == "2" ) or
BWCore(systemId == "3") )
Finally, although that was the way to do it in Drools 3, it is terribly
inefficient compared to the Drools 4/5 constraint connectives. The same
condition above should be re-written in one of the following, much more
efficient, ways:
core : BWCore( systemId in ("1", "2", "3" ) )
core : BWCore( systemId == "1" || == "2" || == "3" )
core : BWCore( systemId == "1" || systemId == "2" || systemId == "3" )
[]s
Edson
2010/3/24 Nars <narayanan.anantharaman at citi.com>
>
> To add more to the above, the error comes only when we bind the matched
> object and use it in consequence. If we do not use the matched object in
> consequence, it works fine.
> --
> View this message in context:
> http://n3.nabble.com/Drools-upgrade-from-3-to-5-OR-syntax-tp471205p471332.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
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100324/e15ad8d9/attachment.html
More information about the rules-users
mailing list