You must not add the parenthesis after <i>not.</i><div><i><br></i></div><div>Try this:</div><div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">rule &quot;Flag missing Foos with values&quot;<br>

when<br>    not Foo(stringProp==&quot;blah&quot;, intProp==5)<br>then<br>   System.err.println(&quot;A proper foo does not exist&quot;);<br>end</font></div><div><br></div><div>Bye</div><div><i>Raf</i><div><br><br><div class="gmail_quote">

On Fri, Aug 19, 2011 at 3:17 PM, Chris Richmond <span dir="ltr">&lt;<a href="mailto:crichmond@referentia.com">crichmond@referentia.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

How do I fire a rule if an object with certain characterstics does not<br>
exists.<br>
<br>
For example my class Foo, if I have a rule:<br>
<br>
rule &quot;Identify Foos with values&quot;<br>
<br>
when<br>
         Foo(stringProp==&quot;blah&quot;, intProp==5)<br>
then<br>
         System.err.println(&quot;A Foo was found!&quot;);<br>
end<br>
<br>
<br>
So how do I check for lack of existence of an object with certain<br>
characteristics<br>
<br>
I tried:<br>
rule &quot;Flag missing Foos with values&quot;<br>
<br>
when<br>
         not(Foo(stringProp==&quot;blah&quot;, intProp==5))<br>
then<br>
         System.err.println(&quot;A proper foo does not exist&quot;);<br>
end<br>
<br>
I also tried:<br>
rule &quot;Flag missing Foos with values&quot;<br>
<br>
when<br>
         not(exists(Foo(stringProp==&quot;blah&quot;, intProp==5)))<br>
then<br>
         System.err.println(&quot;A proper foo does not exist&quot;);<br>
end<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></div></div>