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 :-)


On 25 March 2011 16:59, ljnelson <> 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.

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.  :-(


View this message in context:
Sent from the Drools - Dev mailing list archive at
rules-dev mailing list