<div>Krishnan,</div>  <div>I am using version 3.0.6.</div>  <div>And yes, I have a breakpoint&nbsp;inside this method.</div>  <div>Thanks</div>  <div>-Smitha<BR><BR><B><I>Krishnan &lt;krishiyer@gmail.com&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">hi smitha, <BR><BR>how do you know that setColor() is not getting called ?. Is it because you have a break point inside this method. <BR>Let me try this experiment and get back to you about whether it is working for me or not. Also, which version of <BR>drools are you using ?<BR><BR>-Krishnan. <BR><BR>  <DIV><SPAN class=gmail_quote>On 6/18/07, <B class=gmail_sendername>Smitha Bhat</B> &lt;<A href="mailto:bhat_smitha@yahoo.com">bhat_smitha@yahoo.com</A>&gt; wrote:</SPAN>   <BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">  <DIV>Hi Krishnan,</DIV>  <DIV>I need the class itself
 to be global as I might have to access other functions of it as I go along in the effort. </DIV>  <DIV>I cannot seem to be able to call the methods of this global class. I have also added a snippet of the code.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks</DIV>  <DIV>&nbsp;Smitha</DIV>  <DIV>Here is my drl</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>drl=</DIV><FONT size=1><SPAN class=q>  <DIV>package test.tools.rulesengine</DIV>  <DIV>import test.tools.rulesengine.Utilities;</DIV>  <DIV>global test.tools.rulesengine.Utilities util;</DIV>  <DIV>rule "Rule1"</DIV></SPAN></FONT>  <DIV><FONT size=1>when</FONT></DIV><FONT size=1></FONT>  <DIV><FONT size=1>$Position1 : PosReport()</FONT></DIV><FONT size=1></FONT>  <DIV><FONT size=1>eval($Position1.getName() == "POS_0_1") </FONT></DIV><SPAN class=q><FONT size=1></FONT>  <DIV><FONT size=1>then</FONT></DIV><FONT size=1></FONT>  <DIV></DIV><FONT size=1></FONT>  <DIV><FONT size=1>util.setColor($Position1, "red");</FONT></DIV><FONT
 size=1></FONT>  <DIV><FONT size=1>end</FONT></DIV><FONT size=1></FONT>  <DIV><FONT size=1></FONT>&nbsp;</DIV><FONT size=1></FONT>  <DIV></DIV></SPAN>&nbsp;   <DIV>&nbsp;</DIV>  <DIV>try {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;builder.addPackageFromDrl (new StringReader( drl) );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(firstCall){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; ruleBase = RuleBaseFactory.newRuleBase();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;ruleBase.addPackage( builder.getPackage() );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;workingMemory = ruleBase.newWorkingMemory();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;Utilities util = new Utilities(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;workingMemory.setGlobal("util", util);</DIV>  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;firstCall = false;<BR>&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;}else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;ruleBase.addPackage( builder.getPackage() );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//workingMemory = ruleBase.newWorkingMemory ();<BR>&nbsp;&nbsp;&nbsp;&nbsp;} catch (DroolsParserException e1) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// TODO Auto-generated catch block<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e1.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;} catch (IOException e1) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// TODO Auto-generated catch block<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e1.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;} catch (Exception e1) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// TODO Auto-generated catch block <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e1.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>  <DIV><SPAN class=e id=q_1133f968161f9a7f_5>  <DIV><BR><BR><B><I>Krishnan &lt;<A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:krishiyer@gmail.com" target=_blank>
 krishiyer@gmail.com</A>&gt;</I></B> wrote:</DIV></SPAN></DIV>  <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">  <DIV><SPAN class=e id=q_1133f968161f9a7f_7><BR>Hi Smitha, <BR><BR>They way I understand, in the then clause you would like to call a static function from some class. So, then you can add that to the import and access it directly. It does not have to be global. However, if for some reason you do need to add it as a global,, let me know. <BR><BR>send that when part of the rule again. <BR><BR>-Krishnan. <BR><BR>  <DIV><SPAN class=gmail_quote>On 6/18/07, <B class=gmail_sendername>Smitha Bhat</B> &lt;<A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:bhat_smitha@yahoo.com" target=_blank> bhat_smitha@yahoo.com </A>&gt; wrote:</SPAN>   <BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">  <DIV>Hi Krishnan,</DIV>  <DIV>I need the
 functionality of being able to call methods of a global class in the 'then' piece of the drl. I had defined the drl file as: </DIV>  <DIV>&nbsp;</DIV>  <DIV>package test.tools.rulesengine</DIV>  <DIV>import test.tools.rulesengine.Utilities;</DIV>  <DIV>global test.tools.rulesengine.Utilities util;</DIV>  <DIV>&nbsp;</DIV>  <DIV>rule "Rule1"................. </DIV>  <DIV>&nbsp;</DIV>  <DIV>When I debug the 'when' piece, I see that the method to check the name is being called, but tfter that, the global util's class method is not called. Any pointers would be helpful.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks,</DIV>  <DIV>Smitha   <DIV><SPAN><BR><BR><B><I>Krishnan &lt;<A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:krishiyer@gmail.com" target=_blank> krishiyer@gmail.com </A>&gt;</I></B> wrote:</SPAN></DIV></DIV>  <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">  <DIV><SPAN>Hi Smitha, <BR><BR>Rewrite the rule
 as follows :- <BR><BR>  <DIV><FONT size=2>rule "Rule1"</FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2>when</FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2>$Position1 : Position ( name matches "POS-RPT_0_1" ) <BR>then <BR></FONT></DIV>  <DIV><FONT size=2>$Position.setColor("red");<BR></FONT><FONT size=2></FONT>  <DIV><FONT size=2>end</FONT></DIV><FONT size=2></FONT><BR>Note : You had something called util, unless it is a global, it will not work. <BR></DIV><BR>-Krishnan. <BR><BR>  <DIV><SPAN class=gmail_quote>On 6/18/07, <B class=gmail_sendername>Smitha Bhat</B> &lt;<A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:bhat_smitha@yahoo.com" target=_blank> bhat_smitha@yahoo.com </A>&gt; wrote:</SPAN>   <BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">  <DIV>Hi,</DIV>  <DIV>I am new to JBoss rules. I have a .drl as given below: </DIV>  <DIV>&nbsp;</DIV><FONT size=2></FONT> 
 <DIV><FONT size=2>rule "Rule1"</FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2>when </FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2>$Position1 : Position() </FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2>eval($Position1.getName() contains "POS-RPT_0_1")</FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2>then</FONT></DIV><FONT size=2></FONT>  <DIV></DIV><FONT size=2></FONT>  <DIV><FONT size=2>util.setColor($Position1, "red");</FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2>end</FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2></FONT>&nbsp;</DIV><FONT size=2></FONT>  <DIV><FONT size=2>Before firing the rules, I assert my object as </FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2></FONT>&nbsp;</DIV><FONT size=2></FONT>  <DIV><FONT size=2>posIn = new
 Position(name,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;symbolCode,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lonDouble,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latDouble,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elevDouble,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reportDate,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this);<BR>&nbsp;&nbsp;&nbsp;&nbsp;workingMemory.assertObject ( posIn );<BR>&nbsp;&nbsp;&nbsp;&nbsp;workingMemory.fireAllRules(); </FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2></FONT>&nbsp;</DIV><FONT size=2></FONT>  <DIV><FONT size=2>I get the following error.</FONT></DIV><FONT size=2></FONT>  <DIV><FONT size=2></FONT>&nbsp;</DIV><FONT size=2><FONT color=#ff0000 size=2>  <DIV>org.drools.rule.InvalidRulePackage: Rule Compilation error The left-hand side of an assignment must be a variable Syntax error on token "contains", invalid AssignmentOperator </DIV></FONT><FONT size=2></FONT><FONT color=#ff0000 size=2></FONT></FONT>  <DIV><FONT size=2><FONT color=#ff0000
 size=2>at org.drools.rule.Package.checkValidity(Unknown Source)</FONT></FONT></DIV><FONT size=2><FONT color=#ff0000 size=2></FONT></FONT>  <DIV><FONT size=2><FONT color=#ff0000 size=2>at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)</FONT></FONT></DIV><FONT size=2><FONT color=#ff0000 size=2></FONT></FONT>  <DIV><FONT size=2><FONT color=#ff0000 size=2></FONT></FONT>&nbsp;</DIV><FONT size=2><FONT color=#ff0000 size=2></FONT></FONT>  <DIV><FONT size=2><FONT color=#ff0000 size=2>What is wrong with my drl? I have a Utilities class that I have defined as global. </FONT></FONT></DIV><FONT size=2><FONT color=#ff0000 size=2></FONT></FONT>  <DIV><FONT size=2><FONT color=#ff0000 size=2></FONT></FONT>&nbsp;</DIV><FONT size=2><FONT color=#ff0000 size=2></FONT></FONT>  <DIV><FONT size=2><FONT color=#ff0000 size=2>Thanks</FONT></FONT></DIV><FONT size=2><FONT color=#ff0000 size=2><SPAN>  <DIV>&nbsp;</DIV></SPAN></FONT></FONT><SPAN>  <DIV></DIV>  <HR SIZE=1>  Looking for a
 deal? <A onclick="return top.js.OpenExtLink(window,event,this)" href="http://us.rd.yahoo.com/evt=47094/*http://farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20-" target=_blank>Find great prices on flights and hotels</A> with Yahoo! FareChase.   <DIV></DIV></SPAN><BR>_______________________________________________<BR>rules-users mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org" target=_blank>rules-users@lists.jboss.org</A><BR><A onclick="return top.js.OpenExtLink(window,event,this)" 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><BR clear=all><BR>-- <BR>Sivaramakrishna Iyer Krishnan (Anand) <BR><BR>Never assume the obvious is true. <BR></SPAN></DIV>- William Safire _______________________________________________ <SPAN><BR>rules-users mailing
 list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org" target=_blank>rules-users@lists.jboss.org</A><BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank>https://lists.jboss.org/mailman/listinfo/rules-users</A><BR></SPAN></BLOCKQUOTE><SPAN><BR>  <DIV></DIV>  <HR SIZE=1>  Need a vacation? <A onclick="return top.js.OpenExtLink(window,event,this)" href="http://us.rd.yahoo.com/evt=48256/*http://travel.yahoo.com/;_ylc=X3oDMTFhN2hucjlpBF9TAzk3NDA3NTg5BHBvcwM1BHNlYwNncm91cHMEc2xrA2VtYWlsLW5jbQ--" target=_blank>Get great deals to amazing places </A>on Yahoo! Travel.   <DIV></DIV></SPAN><BR>_______________________________________________<BR>rules-users mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org" target=_blank>rules-users@lists.jboss.org</A><BR><A onclick="return
 top.js.OpenExtLink(window,event,this)" 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><BR clear=all><BR>-- <BR>Sivaramakrishna Iyer Krishnan (Anand) <BR><BR>Never assume the obvious is true. <BR></SPAN></DIV>- William Safire _______________________________________________ <SPAN class=q><BR>rules-users mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org" target=_blank>rules-users@lists.jboss.org</A><BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank>https://lists.jboss.org/mailman/listinfo/rules-users</A><BR></SPAN></BLOCKQUOTE><SPAN class=ad><BR>  <div></div>  <HR SIZE=1>  Get the Yahoo! toolbar and <A onclick="return top.js.OpenExtLink(window,event,this)"
 href="http://us.rd.yahoo.com/evt=48225/*http://new.toolbar.yahoo.com/toolbar/features/mail/index.php" target=_blank>be alerted to new email </A>wherever you're surfing.   <div></div></SPAN><BR>_______________________________________________<BR>rules-users mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A><BR><A onclick="return top.js.OpenExtLink(window,event,this)" 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><BR clear=all><BR>-- <BR>Sivaramakrishna Iyer Krishnan (Anand) <BR><BR>Never assume the obvious is true. <BR>- William Safire _______________________________________________<BR>rules-users mailing list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE><BR><p>&#32;
      <hr size=1>Looking for a deal? <a href="http://us.rd.yahoo.com/evt=47094/*http://farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20-">Find great prices on flights and hotels</a> with Yahoo! FareChase.