Java.<br>-W<br><br><div class="gmail_quote">On 16 December 2010 16:43, Edson Tirelli <span dir="ltr"><<a href="mailto:ed.tirelli@gmail.com">ed.tirelli@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
MVEL or Java?<br>
<br>
Edson<br>
<br>
2010/12/16 Wolfgang Laun <<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Using 5.1.1 and knowing that "a Return Value restriction is a parenthesized<br>
> expression composed from literals, any valid Java primitive or object,<br>
> previously bound variables, function calls, and operators" I wrote<br>
><br>
> OperatorOrder( $code: code, $id1: elId1, $id2: elId2 )<br>
> CommandCode( code == $code, operands != ( $id1!=null ? ($id2!=null ? 2 :<br>
> 1) : 0 ) )<br>
><br>
> and got the erroneous error message:<br>
> Rule Compilation error : [Rule name='operator command: invalid number of<br>
> elements']<br>
><br>
> appl/domain/element/Rule_operator_command__invalid_number_of_elements_0.java<br>
> (9:714) : $id2 cannot be resolved<br>
><br>
> Variations in the return value restriction show that it is the nesting of<br>
> -?-:- which causes the bug; a similar (but not equivalent) expression<br>
><br>
> operands != ( ($id1!=null ? 1:0) + ($id2!=null ? 1:0) )<br>
><br>
> is accepted.<br>
> -W<br>
><br>
><br>
</div></div>> _______________________________________________<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Edson Tirelli<br>
JBoss Drools Core Development<br>
JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>