<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 10"><meta name="Originator" content="Microsoft Word 10"><link rel="File-List" href="file:///C:%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";
        mso-ansi-language:EN-US;
        mso-fareast-language:EN-US;}
p.OSRBodyText, li.OSRBodyText, div.OSRBodyText
        {mso-style-name:"OSR Body Text";
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:11.0pt;
        margin-left:0cm;
        mso-pagination:widow-orphan;
        font-size:11.0pt;
        mso-bidi-font-size:12.0pt;
        font-family:Arial;
        mso-fareast-font-family:"Times New Roman";
        mso-fareast-language:EN-US;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->

<p class="OSRBodyText" style="">I know this
work around. But I have more than 50 rules using that attribute and it looks
very ugly to put null on every rule and its not single attribute. There are
more than 30 attributes in the bean and using them in LHS. Any other sophisticated
way?</p>

<br>&gt; Date: Tue, 12 May 2009 23:15:54 -0700<br>&gt; From: greg_barton@yahoo.com<br>&gt; Subject: Re: [rules-users] NullPointerException with Wrapper objects<br>&gt; To: rules-users@lists.jboss.org<br>&gt; <br>&gt; <br>&gt; All conditions of all applicable rules are evaluated when you insert an object into working memory.  This decides which rule actions can go on the agenda.  Only when a rule action is on the agenda is the salience used to determine the order of action firing.  So doing the null check in the way you're doing it will not work.<br>&gt; <br>&gt; You must put the null check in the same rule, before the potentially null property is used.<br>&gt; <br>&gt; rule "Nett Salary" salience 70<br>&gt;   when<br>&gt;     Salary ( loanDeduction != null, nett != ( gross – loanDeduction – pf) )<br>&gt;   then<br>&gt;     log("Invalid nett salary amount");<br>&gt; end<br>&gt; <br><br><br /><hr />Check out the new Windows Live Messenger <a href='http://windowslive.ninemsn.com.au/article.aspx?id=792335' target='_new'>Looking for a fresh way to share your photos?</a></body>
</html>