<br> I don't think it makes sense to assert null into working memory... null does not matches any object type anyway...<br> Maybe what you want to do is to check for the non-existance of a fact:<br><br>when<br> not Building()
<br>then <br> ...<br>end<br><br> So, don't ever assert null into working memory.<br><br> Edson<br><br><div><span class="gmail_quote">2007/8/14, Stuart Moffatt <<a href="mailto:stuart.moffatt@utah.edu">stuart.moffatt@utah.edu
</a>>:</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("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>
<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> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646
<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>