<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
no but you can do:<br>
not( Building() )<br>
<br>
Mark<br>
Stuart Moffatt wrote:
<blockquote
 cite="mid:766e4ce10708132112q4d05c1aej8931b2d6fa1ee72f@mail.gmail.com"
 type="cite">The incoming building was initialized like this:<br>
  <br>
Building building = null;<br>
FactHandle buildingFact = businessRuleSession.insert( building );<br>
businessRuleSession.setFocus("validate delete or get building");
  <br>
businessRuleSession.fireAllRules();<br>
  <br>
Can drools test for this null building?<br>
What should the rule look like?<br>
  <br>
rule "building is null"<br>
&nbsp;&nbsp;&nbsp; agenda-group "validate delete or get building"
  <br>
&nbsp;&nbsp;&nbsp; salience 10<br>
&nbsp;&nbsp;&nbsp; when<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; boException : BOException()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Building() == null&nbsp; /* this is the problem here -- not sure
what this should look like */<br>
&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; boException.setCode("BO-0008");
  <br>
end<br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>