<!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>
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>
<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>