<br> Actually, I just understood the problem.<br> The "not" CE requires () when used with anything that is not a simple pattern. So the following are valid constructions:<br><br>not A()<br>not( A() and B() )
<br><br> Now, if you want to use a prefixed "and"/"or", it also requires a (). So the following is a valid construction:<br><br>not( (and A() B() ) )<br><br> So, the proposed construction is not valid for current grammar, because it is missing one pair of ():
<br><br>not( and A() B() ) // WRONG<br><br> 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.<br><br> []s<br> Edson<br>
<br><div><span class="gmail_quote">2008/1/15, Edson Tirelli <<a href="mailto:tirelli@post.com">tirelli@post.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> This is a bug. May I ask you please to open a JIRA for it?<br><br> Thanks<br> Edson<br><br><div><span class="gmail_quote">2008/1/15, Gattiker, Alexandre <<a href="mailto:Alexandre.Gattiker@generali.ch" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Alexandre.Gattiker@generali.ch</a>>:</span><div><span class="e" id="q_1177eb55b35b579c_1"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The documentation on the 'and' Conditional Element seems to imply that these constructs are equivalent:
<br><br> $p1:Entity($code1:code)<br> not (and<br> $p2:Entity(code == $code1)<br> eval(MyStaticClass.match($p1, $p2))<br> )<br><br>
$p1:Entity($code1:code)<br> not (<br> $p2:Entity(code == $code1)<br> and eval(MyStaticClass.match($p1, $p2))<br> )<br><br>Actually, the first version crashes with this message:
<br><br>unknown:93:7 Unexpected token 'and'[96,2]: unknown:96:2 mismatched token: [@792,3685:3685=')',<12>,96:2]; expecting type THEN<br><br>I'm on drools 4.0.2 and mvel14-1.2.8.<br><br>Alexandre
<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org
</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></span></div></div><span class="sg"><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000
<br> Mobile: +55 11 9287-5646<br>
JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.jboss.com</a>
</span></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>