Actually, I just understood the problem.
    The "not" CE requires () when used with anything that is not a simple pattern. So the following are valid constructions:

not A()
not( A() and B() )

   Now, if you want to use a prefixed "and"/"or", it also requires a (). So the following is a valid construction:

not( (and A() B() ) )

   So, the proposed construction is not valid for current grammar, because it is missing one pair of ():

not( and A() B() ) // WRONG

    Now, I do think it would be desirable for us to support the above construction, so if you open a ticket for that I will look into enabling it.

    []s
    Edson

2008/1/15, Edson Tirelli <tirelli@post.com>:

    This is a bug. May I ask you please to open a JIRA for it?

    Thanks
       Edson

2008/1/15, Gattiker, Alexandre < Alexandre.Gattiker@generali.ch>:
The documentation on the 'and' Conditional Element seems to imply that these constructs are equivalent:

                $p1:Entity($code1:code)
                not (and
                        $p2:Entity(code == $code1)
                         eval(MyStaticClass.match($p1, $p2))
                )

                $p1:Entity($code1:code)
                not (
                        $p2:Entity(code == $code1)
                        and eval(MyStaticClass.match($p1, $p2))
                )

Actually, the first version crashes with this message:

unknown:93:7 Unexpected token 'and'[96,2]: unknown:96:2 mismatched token: [@792,3685:3685=')',<12>,96:2]; expecting type THEN

I'm on drools 4.0.2 and mvel14-1.2.8.

Alexandre

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
  Edson Tirelli
  JBoss Drools Core Development
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com



--
  Edson Tirelli
  JBoss Drools Core Development
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com