All right, let&#39;s hope that &quot;business user&quot; is up to write the rules, even without null checks ;-)<br>Seriously now: are they up to handling monetary units represented as floating point numbers? A recent thread has emphasized the problems arising from tests such as floatVal &lt;= floatConst, and I&#39;ve been preaching about possible inconsistencies due to the inherent nature of FP arithmetic, even for doing sums. BigDecimal is one solution, but I guess your BUs will go ballistic if you tell them about the consequences... <br>
<br>But here&#39;s my last proposal for circumnavigating the NPE issue:<br><br>At the point of fact insertion, wrap all &quot;dangerous&quot; bean objects into a container fact with a single field and insert the container. Write rules matching the container, testing the wrapped object for field == null and whatever; if so, change and log; and now insert the wrapped object as a fact proper. (If necessary, you could even write a single rule for all fact types, using inspection to determine all dangerous fields.)<br>
<br>-W<br><br><br><div class="gmail_quote">2009/5/14 Shabbir Dhari <span dir="ltr">&lt;<a href="mailto:sdhari@hotmail.com">sdhari@hotmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>


<p>Thanks to
all.<br>
<br>
The problem we have is that rules will be code by business user. As a developer
I don’t mind putting null check on every rule. But for business user its
unacceptable for checking null for the same attribute in around 50 rules. <br>
<br>
Shannon, can you please elaborate more about your
solution or if possible post some simple code?<b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);"></span></b></p>

&gt; Date: Wed, 13 May 2009 08:28:53 -0700<br>&gt; From: <a href="mailto:greg_barton@yahoo.com" target="_blank">greg_barton@yahoo.com</a><br>&gt; Subject: RE: [rules-users] NullPointerException with Wrapper objects<br>&gt; To: <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
&gt; <br>&gt; <br>&gt; Well, like Wolfgang said, good luck with that. :)  The only rules engine I know that does this is Tibco BusinessEvents, and it&#39;s accomplished by making a copy of your objects before inserting them into working memory.  <br>
&gt; <br>&gt; &gt;From this forum post I&#39;m guessing JRules doesn&#39;t do it: <a href="http://forums.ilog.com/brms/index.php?topic=1439.0" target="_blank">http://forums.ilog.com/brms/index.php?topic=1439.0</a><br>&gt; <br>
&gt; And probably Blaze Advisor doesn&#39;t do it either:<br>&gt; <a href="http://discuss.fico.com/blaze/board/message?board.id=Blaze_Advisor_Users_Forum&amp;message.id=591" target="_blank">http://discuss.fico.com/blaze/board/message?board.id=Blaze_Advisor_Users_Forum&amp;message.id=591</a><br>
&gt; <br>&gt; So, I&#39;m thinking you&#39;re stuck with having to do null checks.<br>&gt; <br><br><br><hr>Click Here <a href="http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Ecom%2Eau%2Fsearch%2Fsearch%2Easpx%3Fexec%3Dgo%26tp%3Dq%26gc%3D2%26tr%3D1%26lage%3D18%26uage%3D55%26cl%3D14%26sl%3D0%26dist%3D50%26po%3D1%26do%3D2%26trackingid%3D1046138%26r2s%3D1&amp;_t=773166090&amp;_r=Hotmail_Endtext&amp;_m=EXT" target="_blank">View photos of singles in your area</a></div>

<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a 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>