Ok, the parenthesis makes sense.<br><br>But when I enclose the pattern as Michael suggested, it gets a runtime error trying to parse. I attached a sample project illustrating this in an earlier response. So isn't there still a problem?
<br><br>-Chris<br><br><div><span class="gmail_quote">On 10/4/07, <b class="gmail_sendername">Edson Tirelli</b> <<a href="mailto:tirelli@post.com">tirelli@post.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> From the manual:<br><br>"A not statement must be followed by parentheses around the pattern
that it applies to. In the simplest case of a single pattern (like below)
you can omit the parentheses."<br> <br> We improved the docs for the next version. Hope it is clearer now. But Michael got it right.<br><br> []s<br> Edson<br><br><div><span class="gmail_quote">2007/10/4, Anstis, Michael (M.) <
<a href="mailto:manstis1@ford.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">manstis1@ford.com</a>>:</span><div><span class="e" id="q_1156be80fb9b0dbb_1"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">What if you try "<font color="#000000" face="Times New Roman" size="3">not (Foo(id == 10) from $foos)<font color="#0000ff" face="Arial" size="2">
"?</font></font></font></span></div><br>
<blockquote style="margin-right: 0px;">
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><span><b>From:</b> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Chris
West<br></span><b>Sent:</b> 04 October 2007 16:59<br><b>To:</b> Rules Users
List<br><b>Subject:</b> Re: [rules-users] using from with
not<br></font><br></div><div><span>
<div></div>It does not compile. The error is:<br>unknown:32:20
mismatched token: [@243,682:685='from',<38>,32:20]; expecting type
THEN<br><br>-Chris<br><br>
<div><span class="gmail_quote">On 10/4/07, <b class="gmail_sendername">Anstis,
Michael (M.)</b> <<a href="mailto:manstis1@ford.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">manstis1@ford.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Does it
not compile (in which case can you post the error)?</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Or does
it not activate?</font></span></div><br>
<blockquote style="margin-right: 0px;">
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a> [mailto:
<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of
</b>Chris West<br><b>Sent:</b> 04 October 2007 16:03<br><b>To:</b> Rules
Users List<br><b>Subject:</b> [rules-users] using from with
not<br></font><br></div>
<div><span>
<div></div>Hello,<br><br>Does anyone know why rule "GoodBye2" below does
not compile, but rule "GoodBye1" does compile using Drools 4.0.0?
The only difference is the "not". Shouldn't this be valid?
<br><br>Thanks,<br>-Chris<br><br><br>package
com.sample<br> <br>import com.sample.DroolsTest.Message;<br>import
com.sample.DroolsTest.Foo;<br>import java.util.List;<br> <br>rule
"Hello World"<br> when<br>
m : Message( status == Message.HELLO, message :
message )<br> then<br>
System.out.println( message ); <br>
m.setMessage( "Goodbye cruel world" );<br>
m.setStatus( Message.GOODBYE );<br>
update( m );<br>end <br><br>rule
"GoodBye1"<br> no-loop true<br>
when<br> m : Message( status ==
Message.GOODBYE, message : message, $foos: foos )<br>
Foo(id == 10) from $foos<br>
then<br> System.out.println (
message ); <br> m.setMessage( message
);<br> <br>end<br><br>rule
"GoodBye2"<br> no-loop true<br>
when<br> m : Message( status ==
Message.GOODBYE, message : message, $foos: foos )<br>
not Foo(id == 10) from $foos<br>
then<br> System.out.println(
message ); <br> m.setMessage( message
);<br> <br>end
</span></div></blockquote></div><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><br><br clear="all"></blockquote></div><br></span></div></blockquote></div>
<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><br><br clear="all"></blockquote></span></div></div><span class="sg"><br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer
<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><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div>
<br>