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
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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev