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> agenda-group "validate delete or get building"
<br> salience 10<br> when<br> boException : BOException()<br> Building() == null /* this is the problem here -- not sure what this should look like */<br> then<br> boException.setCode("BO-0008");
<br>end<br><br>