<br>&nbsp;&nbsp; I don&#39;t think it makes sense to assert null into working memory... null does not matches any object type anyway...<br>&nbsp;&nbsp; Maybe what you want to do is to check for the non-existance of a fact:<br><br>when<br>&nbsp;&nbsp;&nbsp; not Building()
<br>then <br>&nbsp;&nbsp; ...<br>end<br><br>&nbsp;&nbsp; So, don&#39;t ever assert null into working memory.<br><br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/8/14, Stuart Moffatt &lt;<a href="mailto:stuart.moffatt@utah.edu">stuart.moffatt@utah.edu
</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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>
<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><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>