<br>&nbsp;&nbsp;&nbsp; Yuri,<br><br>&nbsp;&nbsp;&nbsp; We support -&gt; for backward compatibility and I confess I haven&#39;t seen this error before. I guess it may be complaining about the variable binding:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $age : age -&gt; (Math.abs($age - 
c1.age) &lt; 10),<br><br>&nbsp;&nbsp;&nbsp; Anyway, if you can please open a JIRA for that. <br>&nbsp;&nbsp;&nbsp; An yes, we prefer to not use -&gt; anymore, so if you are able to change this during your upgrade, then it is better to simply use the &quot;eval&quot; keyword instead of the -&gt;. Example:
<br><br>&nbsp;&nbsp; c2:Child( eval(Math.abs(age - c1.age) &lt; 10), ...)<br><br>&nbsp;&nbsp;&nbsp; Note that if that is the only place where you use the &quot;age&quot; field, the binding is automatically created for you. You don&#39;t need to do it explicitly anymore. If you need the binding for other purposes, you can do a regular binding:
<br><br>&nbsp;&nbsp; c2:Child( $age : age, eval(Math.abs($age - c1.age) &lt; 10), ...)<br>
<br>&nbsp;&nbsp;&nbsp; Regarding your second questions, the answer is yes. We now support totally nestable &amp;&amp; and || as constraints and restriction connectors. So:<br><br>&nbsp;&nbsp; p2: Person(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (sex == &quot;M&quot; &amp;&amp; 
p1.sex == &quot;F&quot;) || (sex == &quot;F&quot; &amp;&amp; p1.sex == &quot;M&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br><br>&nbsp;&nbsp;&nbsp;&nbsp; () are optional and &amp;&amp; has higher priority than ||. <br>&nbsp;&nbsp;&nbsp;&nbsp; We already updated docs for such things in the manual. I would like to ask you to read and please provide feedback and even patches for parts of the text that eventually are not clear:
<br><br><a href="http://labs.jboss.com/file-access/default/members/drools/freezone/docs/4.0.0.13773GA/html/index.html">http://labs.jboss.com/file-access/default/members/drools/freezone/docs/4.0.0.13773GA/html/index.html</a>
<br><br>&nbsp;&nbsp;&nbsp; Section 6.5.2.<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><br><div><span class="gmail_quote">2007/7/25, Yuri &lt;<a href="mailto:ydewit@gmail.com">ydewit@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am migrating my 3.0.6 rules into 4.0 but I am getting the following error in<br>Drools IDE:<br><br>&quot;Trying to create a restriction for an empty restriction&quot;<br><br>I am basically using an inline-eval (I believe this is the new terminology for
<br>the -&gt;() construct):<br><br>Rule<br>when<br>&nbsp;&nbsp; c1:Child()<br>&nbsp;&nbsp; c2:Child(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;age -&gt; (Math.abs(age - c1.age) &lt; 10),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...)<br>then<br>&nbsp;&nbsp; ...<br>end<br><br>If I remove the &quot;age -&gt; ...&quot; line the error goes away.
<br><br>Along the same lines I am also wondering if there is a better way (aside from<br>using &quot;-&gt;()&quot;, which has a lower perf as I understand it) of doing the following:<br><br>Rule<br>when<br>&nbsp;&nbsp; p1: Person()
<br>&nbsp;&nbsp; p2: Person(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sex -&gt; (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(sex == &quot;M&quot; &amp;&amp; p1.sex == &quot;F&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|| (sex == &quot;F&quot; &amp;&amp; p1.sex == &quot;M&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )
<br>&nbsp;&nbsp; )<br>then<br>&nbsp;&nbsp; insert(new Couple(p1, p2));<br>end<br><br>thanks,<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer
<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>