<br>   The DRL parser requires that the argument expression to a &quot;from&quot; CE be a function call or a chained call to methods. The work around to that is to call the MVEL &quot;function&quot; &quot;return&quot;:<br>
<br>$items: LinkedList (size &gt; 1) from collect ( Model ( ) from return( object.getOriginal(null) in spatialIndex.query(...) ) )<br><br>   This way, the parser will passthrough whatever he finds inside the return( ... ) to MVEL. Let us know if it works for you. I never tested that.<br>
<br>   []s<br>   Edson<br>
<br><br><br><div class="gmail_quote">2009/8/5 Simon Thum <span dir="ltr">&lt;<a href="mailto:simon.thum@gmx.de">simon.thum@gmx.de</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Edson Tirelli wrote:<br>
&gt;    Simon,<br>
&gt;<br>
&gt;    Can you show us what syntax are you trying?<br>
</div>Sure, I was just speculating it&#39;s known or trivial.<br>
<br>
Works:<br>
$items: LinkedList (size &gt; 1) from collect ( Model ( ) from<br>
spatialIndex.query(...) )<br>
<br>
Fails:<br>
<br>
$items: LinkedList (size &gt; 1) from collect ( Model ( ) from<br>
&gt;object.getOriginal(null) in spatialIndex.query(...)&lt; )<br>
<br>
The angle brackets aren&#39;t typed, they just mark what&#39;s intended as mvel.<br>
<div><div></div><div class="h5"><br>
&gt;<br>
&gt;    []s<br>
&gt;    Edson<br>
&gt;<br>
&gt; 2009/8/5 Simon Thum &lt;<a href="mailto:simon.thum@gmx.de">simon.thum@gmx.de</a>&gt;<br>
&gt;<br>
&gt;&gt; Hi all,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve stumbled on some mvel integration issues in 5.0.1. I&#39;m using drools<br>
&gt;&gt; to do, among others, spatial reasoning. At insertion time I maintain a<br>
&gt;&gt; specialized index, which can be queried later using [collect] from. This<br>
&gt;&gt; works fine in general.<br>
&gt;&gt;<br>
&gt;&gt; However, as soon as I use the mvel 2 projections a.k.a. &#39;in&#39; keyword,<br>
&gt;&gt; hell breaks loose. &#39;in&#39; is described here:<br>
&gt;&gt; <a href="http://mvel.codehaus.org/MVEL+2.0+Projections+and+Folds" target="_blank">http://mvel.codehaus.org/MVEL+2.0+Projections+and+Folds</a><br>
&gt;&gt;<br>
&gt;&gt; But I only seem to get syntax errors. If it is possible, to somehow<br>
&gt;&gt; escape keywords or explicitly pipe through the mvel part, please let me<br>
&gt;&gt; know!<br>
&gt;&gt;<br>
&gt;&gt; Needless to say, this feature would be great to have since my object<br>
&gt;&gt; model is mainly fixed and &#39;is&#39; allows me to compensate that. Worse, I&#39;d<br>
&gt;&gt; need to assert objects I don&#39;t want to assert to work around.<br>
&gt;&gt;<br>
&gt;&gt; I tried parenthesizing, only to discover that<br>
&gt;&gt; ... from valid_stmt<br>
&gt;&gt;<br>
&gt;&gt; is fine, but<br>
&gt;&gt;<br>
&gt;&gt; ... from (valid_stmt)<br>
&gt;&gt;<br>
&gt;&gt; won&#39;t work either. Error 101, reason unknown, but it doesn&#39;t even make<br>
&gt;&gt; it through the parser.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;d really appreciate to be given an idea why what I did went wrong.<br>
&gt;&gt; Googling around didn&#39;t get me too far.<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt;<br>
&gt;&gt; Simon<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>