<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007>It looks like you are incorrectly using
globals.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007>You need to insert a new fact into the working memory
for LoanApplicationBean (you currently add an instance as a global -
Final.main).</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007>Your rule should also work on Facts and not globals
(which should be reserved for RHS function); for example:-</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=709354710-03102007>rule "go, go gadget validator"</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=709354710-03102007> when</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=709354710-03102007> $l :
LoadApplicationBean( fullName == "" )</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=709354710-03102007> then</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=709354710-03102007>
myGlobal.log("An inappropriate name");</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#0000ff size=2><SPAN
class=709354710-03102007>end</SPAN></FONT></DIV></BLOCKQUOTE>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007>All of which is in the documetation and
examples.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=709354710-03102007>I have not tried your code as I am at
work...</SPAN></FONT></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> prateek.katiyar@wipro.com
[mailto:prateek.katiyar@wipro.com] <BR><B>Sent:</B> 03 October 2007
10:57<BR><B>To:</B> Anstis, Michael (M.)<BR><B>Subject:</B> Re:Help
me<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText31558 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>
<DIV id=idOWAReplyText48456 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hi </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks for your reply.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>I have three rules in my rule file.I
want that when i run my first java program,out of those three rules only first
two rules should be validated </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>and when i run a other java program the
only third rule should be validated.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>For this i put my first two rules in one
agenda group and i put the third rule in another agenda group.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Now when i run my first java program
then instead of validating only the first two rules,the third rule
is also validating and giving ma a exception as:</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><U><FONT color=#000080 size=2>
<P align=left>org.drools.RuntimeDroolsException</U></FONT><FONT color=#ff0000
size=2>: </FONT><U><FONT color=#000080
size=2>java.lang.NullPointerException</P></U></FONT><FONT color=#ff0000
size=2>
<P align=left>at org.drools.rule.EvalCondition.isAllowed(</FONT><U><FONT
color=#000080 size=2>EvalCondition.java:75</U></FONT><FONT color=#ff0000
size=2>)</P>
<P align=left>at
org.drools.reteoo.EvalConditionNode.assertTuple(</FONT><U><FONT color=#000080
size=2>EvalConditionNode.java:141</U></FONT><FONT color=#ff0000 size=2>)</P>
<P align=left>at
org.drools.reteoo.CompositeTupleSinkAdapter.createAndPropagateAssertTuple(</FONT><U><FONT
color=#000080 size=2>CompositeTupleSinkAdapter.java:73</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at
org.drools.reteoo.LeftInputAdapterNode.assertObject(</FONT><U><FONT
color=#000080 size=2>LeftInputAdapterNode.java:131</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(</FONT><U><FONT
color=#000080 size=2>SingleObjectSinkAdapter.java:20</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P>at org.drools.reteoo.ObjectTypeNode.assertObject(</FONT><U><FONT
color=#000080 size=2>ObjectTypeNode.java:168</U></FONT><FONT color=#ff0000
size=2>)</P></FONT><FONT size=3> </FONT><FONT color=#ff0000 size=2>
<P align=left>at org.drools.reteoo.Rete.assertObject(</FONT><U><FONT
color=#000080 size=2>Rete.java:168</U></FONT><FONT color=#ff0000 size=2>)</P>
<P align=left>at org.drools.reteoo.ReteooRuleBase.assertObject(</FONT><U><FONT
color=#000080 size=2>ReteooRuleBase.java:190</U></FONT><FONT color=#ff0000
size=2>)</P>
<P align=left>at
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(</FONT><U><FONT
color=#000080 size=2>ReteooWorkingMemory.java:163</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(</FONT><U><FONT
color=#000080 size=2>AbstractWorkingMemory.java:1241</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at
org.drools.common.AbstractWorkingMemory.fireAllRules(</FONT><U><FONT
color=#000080 size=2>AbstractWorkingMemory.java:421</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at
org.drools.common.AbstractWorkingMemory.fireAllRules(</FONT><U><FONT
color=#000080 size=2>AbstractWorkingMemory.java:392</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at com.wipro.rfq.report.bean.Validator.main(</FONT><U><FONT
color=#000080 size=2>Validator.java:87</U></FONT><FONT color=#ff0000
size=2>)</P>
<P align=left>Caused by: </FONT><U><FONT color=#000080
size=2>java.lang.NullPointerException</P></U></FONT><FONT color=#ff0000
size=2>
<P align=left>at rules.Rule_validate_FullName_0.eval0(</FONT><U><FONT
color=#000080 size=2>Rule_validate_FullName_0.java:9</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at
rules.Rule_validate_FullName_0Eval0Invoker.evaluate(</FONT><U><FONT
color=#000080
size=2>Rule_validate_FullName_0Eval0Invoker.java:16</U></FONT><FONT
color=#ff0000 size=2>)</P>
<P align=left>at org.drools.rule.EvalCondition.isAllowed(</FONT><U><FONT
color=#000080 size=2>EvalCondition.java:71</U></FONT><FONT color=#ff0000
size=2>)</P>
<P>... 12 more</P>
<P><FONT color=#000000>i am attaching my all three programs with this
mail.</FONT></P>
<P><FONT color=#000000>Now give me some idea that how can i achieve my
requirements?</FONT></P></FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT> </DIV></DIV>
<DIV id=idSignature51330 dir=ltr>
<DIV><FONT face=Arial><EM><STRONG>With Regards</STRONG></EM></FONT></DIV>
<DIV><FONT face=Arial><EM><STRONG>Prateek
Katiyar</STRONG></EM></FONT></DIV></DIV></FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT> </DIV></DIV>
<DIV id=idSignature26996 dir=ltr> </DIV>
<TABLE>
<TBODY>
<TR>
<TD bgColor=#ffffff><FONT color=#000000><BR>The information contained in
this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain proprietary,
confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this
message and any attachments. <BR><BR>WARNING: Computer viruses can be
transmitted via email. The recipient should check this email and any
attachments for the presence of viruses. The company accepts no
liability for any damage caused by any virus transmitted by this
email.<BR><BR>www.wipro.com<BR></FONT></TD></TR></TBODY></TABLE></BLOCKQUOTE></BODY></HTML>