The incoming building was initialized like this:<br><br>Building building = null;<br>FactHandle buildingFact = businessRuleSession.insert( building );<br>businessRuleSession.setFocus(&quot;validate delete or get building&quot;);
<br>businessRuleSession.fireAllRules();<br><br>Can drools test for this null building?<br>What should the rule look like?<br><br>rule &quot;building is null&quot;<br>&nbsp;&nbsp;&nbsp; agenda-group &quot;validate delete or get building&quot;
<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(&quot;BO-0008&quot;);
<br>end<br><br>