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