Seems I messed that up. Again: Works: $items: LinkedList (size > 1) from collect ( Model ( ) from spatialIndex.query(...) )
Fails: $items: LinkedList (size > 1) from collect ( Model ( ) from > object.getOriginal(null) in spatialIndex.query(...) < ) The >statement< is mvel. spatialIndex is a global. All mvel projection examples are given in parenthesized form, it may be required. So the mvel itself should likely be (object.getOriginal(null) in spatialIndex.query(...)) This would pick e.getObject().getOriginal(null) for each collection member e. However, this doesn't even work in the slim non-projection, i.e. from spatialIndex.query(...) works, but from (spatialIndex.query(...)) does not even parse. Thanks for looking into it! > >> []s >> Edson >> >> 2009/8/5 Simon Thum <[email protected]> >> >>> 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 >>> _______________________________________________ >>> rules-users mailing list >>> [email protected] >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> rules-users mailing list >> [email protected] >> https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
