[rules-dev] JBRULES-2932: suspicious syntax might be the cause?

Wolfgang Laun wolfgang.laun at gmail.com
Fri Mar 25 13:22:40 EDT 2011


This is correct syntax, although the parens are redundant in this particular
situation.

Technically, this is called a "multi-restriction". Expand it by inserting
the field (answer.ID) in front of each relational operator. It's inherited
from COBOL :-)

-W



On 25 March 2011 16:59, ljnelson <ljnelson at gmail.com> wrote:

> In case anyone is following along (silent list!), I finally ran the
> debugger
> on JBRULES-2932 and found a suspicious bit of syntax that was accepted by
> Drools 5.1.1 but which causes Drools 5.2.0-SNAPSHOT to barf.
>
>
> https://issues.jboss.org/browse/JBRULES-2932?focusedCommentId=12591856#comment-12591856
>
> At issue is the following construction:
>
> answer.ID ( > 1 && < 4 ) || == 5
>
> That parenthetical followed by an or-equals looks suspicious to me (dialect
> mvel).  Although Drools 5.1.1 eats it just fine, should it?  I want to tell
> my users to write the proper rule syntax; this doesn't look right to me.
>  On
> the other hand, if it is proper syntax, I'd rather not change it, as there
> are hundreds of rules that use it.  :-(
>
> Best,
> Laird
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/JBRULES-2932-suspicious-syntax-might-be-the-cause-tp2730984p2730984.html
> Sent from the Drools - Dev mailing list archive at Nabble.com.
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110325/6047ed02/attachment.html 


More information about the rules-dev mailing list