[rules-users] MVEL parsing / keyword conflict

Simon Thum simon.thum at gmx.de
Wed Aug 5 15:19:15 EDT 2009


Hi all,

I've stumbled on some mvel integration issues in 5.0.1. I'm using drools
to do, among others, spatial reasoning. At insertion time I maintain a
specialized index, which can be queried later using [collect] from. This
works fine in general.

However, as soon as I use the mvel 2 projections a.k.a. 'in' keyword,
hell breaks loose. 'in' is described here:
http://mvel.codehaus.org/MVEL+2.0+Projections+and+Folds

But I only seem to get syntax errors. If it is possible, to somehow
escape keywords or explicitly pipe through the mvel part, please let me
know!

Needless to say, this feature would be great to have since my object
model is mainly fixed and 'is' allows me to compensate that. Worse, I'd
need to assert objects I don't want to assert to work around.

I tried parenthesizing, only to discover that
... from valid_stmt

is fine, but

... from (valid_stmt)

won't work either. Error 101, reason unknown, but it doesn't even make
it through the parser.

I'd really appreciate to be given an idea why what I did went wrong.
Googling around didn't get me too far.

Cheers,

Simon



More information about the rules-users mailing list