<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I think Im not agree with that... the question here is about how the Rule languaje will treat an expresion<DIV>made by a businness agent to the rules... so when a rule has a condition writen like this:</DIV><DIV>     Fact( field &gt; 3)</DIV><DIV>  this is asking : Is there a fact of type Fact which has a field and the value of that value is greater that 3..</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>So, if the Fact actually exists and for 'some reason' its field "field" has a value which is not greater than 3</DIV><DIV>(the rule doesn't need to know why the value is not 3, or is 0, or null or whatever) then the condition must</DIV><DIV>return (or been evaluated as) false. Its responsability for the DAO or fill implementation of the fact to put the</DIV><DIV>right value on its fields, the values that MEAN something. If its null it is possible that the value was never</DIV><DIV>setted or initialized, or maybe it means something else. If a bussiness guy wants to ask for been null</DIV><DIV>   Fact( field == null) </DIV><DIV>then that question is a meaningfull one, dont let programmers decide what it means. If I wanna to ask for</DIV><DIV>being greater that 3, and it has no value, then the answer is NO, "it is NO greather than 3".</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>well... this is just my humile opinion btw....</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On 15-03-2007, at 13:03, Tom Gonzalez wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> <DIV><FONT face="Arial" color="#0000ff" size="2"><SPAN class="285305216-15032007">We handle it as it can't be anything else but null cause null is returned when an access fails or some error occurs. This keeps it from falling into a valid evaluation and possibly a subtle bug going uncaught.</SPAN></FONT></DIV> <DIV><FONT face="Arial" color="#0000ff" size="2"><SPAN class="285305216-15032007"></SPAN></FONT> </DIV> <DIV><FONT face="Arial" color="#0000ff" size="2"><SPAN class="285305216-15032007">Tom G</SPAN></FONT></DIV><BR> <DIV class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left"> <HR tabindex="-1"> <FONT face="Tahoma" size="2"><B>From:</B> rules-dev-bounces@lists.jboss.org [<A href="mailto:rules-dev-bounces@lists.jboss.org">mailto:rules-dev-bounces@lists.jboss.org</A>] <B>On Behalf Of </B>Mark Proctor<BR><B>Sent:</B> Thursday, March 15, 2007 12:42 PM<BR><B>To:</B> Rules Dev List<BR><B>Subject:</B> Re: [rules-dev] need advice re null handling<BR></FONT><BR></DIV> <DIV></DIV>Its not about giving it up, its how we handle when those fields are null, do we treat it like a primitive and assume its 0, or do we say it can't be equal to anything else but null.<BR><BR>In the following example neither y or z is defined, thus y is null and z is 0;<BR><BR>int x = 0;<BR>Integer y;<BR>in z;<BR>x == y // is false;<BR>x == z // is true<BR>y == null // is true<BR><BR>Mark<BR><BR>Tom Gonzalez wrote: <BLOCKQUOTE cite="mid:25E284CCA9C9A14B89515B116139A94D108F3A88@zrtphxm0.corp.nortel.com" type="cite">    <DIV><SPAN class="025450516-15032007"><FONT face="Arial" color="#0000ff" size="2">The   flexibility provided by an Object is very valuable. We use Integer and String   objects all over the place today in our facts with drools. I would   hate to give it up.</FONT></SPAN></DIV>  <DIV><SPAN class="025450516-15032007"></SPAN> </DIV>  <DIV><SPAN class="025450516-15032007"><FONT face="Arial" color="#0000ff" size="2">Tom   G</FONT></SPAN></DIV><BR>  <DIV class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left">  <HR tabindex="-1">  <FONT face="Tahoma" size="2"><B>From:</B> <A class="moz-txt-link-abbreviated" href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</A>   [<A class="moz-txt-link-freetext" href="mailto:rules-dev-bounces@lists.jboss.org">mailto:rules-dev-bounces@lists.jboss.org</A>]   <B>On Behalf Of </B>Mark Proctor<BR><B>Sent:</B> Thursday, March 15, 2007 6:29   AM<BR><B>To:</B> Rules Dev List<BR><B>Subject:</B> Re: [rules-dev] need advice   re null handling<BR></FONT><BR></DIV>if bar is an integer it will be 0, if its   an Integer it will be null. The Q is do we make Integer work like the   primitive, or do we make it work like an Object.<BR><BR>Mark<BR>Michael Neale   wrote:   <BLOCKQUOTE cite="mid:96ab3ced0703142259q513d3170je37fbebc89040975@mail.gmail.com" type="cite"><A href="http://jira.jboss.com/jira/browse/JBRULES-627" moz-do-not-send="true">http://jira.jboss.com/jira/browse/JBRULES-627</A><BR><BR>OK,     this much is clear: <BR><BR>Foo(field == null) can be true if field is     null.<BR><BR>but, what about Foo(field &gt; 3), and field is null? should     that be false? what about Foo(field != 3) - should that be true? <BR><BR>in     SQL, null will always result in a false condition, unless you explicitly use     null.<BR><BR>Thoughts? <BR><BR>Michael.<BR><PRE wrap=""><HR width="90%" size="4">_______________________________________________
rules-dev mailing list
<A class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org" moz-do-not-send="true">rules-dev@lists.jboss.org</A>
<A class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev" moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-dev</A>
  </PRE></BLOCKQUOTE><BR><PRE wrap=""><HR width="90%" size="4">_______________________________________________
rules-dev mailing list
<A class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A>
<A class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</A>
  </PRE></BLOCKQUOTE><BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rules-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><SPAN class="Apple-style-span" style="text-decoration: underline;; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="-khtml-text-decorations-in-effect: underline; ">                                                                        </SPAN></SPAN><DIV><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><B style="font-size: 13px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 13px; font-weight: bold; ">Felipe Piccolini M.</SPAN></B></SPAN></FONT></DIV><DIV><A href="mailto:felipe.piccolini@bluesoft.cl"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; ">felipe.piccolini@bluesoft.cl</SPAN></A></DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>