Thanks Edson. I was able to get to this URL yesterday through some search on the net. <br><br>
<div><span class="gmail_quote">On 7/4/07, <b class="gmail_sendername">Edson Tirelli</b> <<a href="mailto:tirelli@post.com">tirelli@post.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br> Natraj<br> <br> The link is:<br><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://jira.jboss.com/jira/browse/JBRULES" target="_blank">
http://jira.jboss.com/jira/browse/JBRULES</a><br><br> You need to create an account for you first, providing your e-mail, so you get notified when the ticket is worked on. <br><br> []s<br> Edson<br><br>
<div><span class="gmail_quote">2007/7/4, Natraj Gudla <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:natraj.forums@gmail.com" target="_blank">natraj.forums@gmail.com</a>>:</span>
<div><span class="e" id="q_11391512325a44c7_1">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>Thanks Edson. I have never used JIRA earlier. Can you give me the required URL or set up details to have it going for me. </div>
<div> </div>
<div>Thanks</div><span>
<div>Natraj<br><br> </div></span>
<div><span>
<div><span class="gmail_quote">On 7/3/07, <b class="gmail_sendername">Edson Tirelli</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>> wrote:
</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><br> Natraj,<br><br> There are a couple technical difficulties why this does not work, but if you think it would be important to have that, please open a JIRA with the feature request. We will look into making that possible in future releases.
<br><br> Thank you,<br> Edson<br><br><br>
<div><span class="gmail_quote">2007/7/3, Natraj Gudla <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:natraj.gudla@gmail.com" target="_blank">natraj.gudla@gmail.com</a>>:</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 Edson, thanks for the update. Any specific reason why this is so? Because as a general convention in Java, we tend to use global declarations in any constructs across. It would be a good thing to have.</div>
<div><span>
<div> </div>
<div> <br><br> </div>
<div><span class="gmail_quote">On 7/2/07, <b class="gmail_sendername">Edson Tirelli</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>> wrote:
</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><br> Natraj,<br><br> Globals were not designed to be available in functions, unless they are sent in as parameters in the way you did in your second example.
<br><br> []s<br> Edson<br><br>
<div><span class="gmail_quote">2007/7/2, Natraj Gudla <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:natraj.gudla@gmail.com" target="_blank">natraj.gudla@gmail.com</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div><span>
<div>Hello,</div>
<div> </div>
<div>I am using Drools 3.0.6. While using a global variable in a function, the compiler complains it cannot resolve the global variable name. Something like below</div>
<div> </div><b><font color="#960000" size="2">
<p>global</p></font></b><font size="2">com.<strong>sample</strong>.ExampleLogger <strong>customLogger</strong>;</font><b><font color="#960000" size="2">
<p align="left">function</p></font></b><font size="2"></font><b><font color="#960000" size="2">void</font></b><font size="2"> logMessage(String msg){</font><font size="2">
<p align="left"></p></font><font color="#808000" size="2">customLogger.logMessage("Log Message from the function");</font><font size="2">
<p>}</p>
<div></div></font>In the above code, it complains "customLogger cannot be resolved". I am able to refer the global in the consequence of a rule directly. What is the problem using the reference within a function.
<div> </div>
<div>On the other hand, i am able to do something like</div>
<div><strong><font color="#960000" size="2"> </font></strong>
<p align="left">function<font size="2"> </font><b><font color="#960000" size="2">void</font></b><font size="2"> logMessage(<font size="2">ExampleLogger custLogger,</font>String msg){</font></p><font size="2">
<p align="left"></p></font><font color="#808000" size="2"><font size="2">
<p>custLogger.logMessage(msg+</p></font><font color="#008000" size="2">" Accept gloabal as function parameter"</font><font size="2">);
<p align="left"></p></font></font><font size="2">}</font></div>
<div>and call from the consequence of a rule : <font size="2">logMessage(customLogger); // I am passing the global to the function as an argument and then use it to log a message. </font></div>
<div><font size="2">This way is working. But not the first way of using the global in the function. </font></div>
<div><font size="2"></font> </div>
<div><font size="2">Any help??</font></div>
<p>Thanks<br>-- <br>Natraj Gudla </p></span></div><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> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646 <br> JBoss, a division of Red Hat @
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.jboss.com/" target="_blank">www.jboss.com</a> <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></span></div><span>Natraj Gudla </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> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.jboss.com/" target="_blank">www.jboss.com</a> <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></span></div><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></span></div></div>
<div><span class="e" id="q_11391512325a44c7_3"><br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.jboss.com/" target="_blank">www.jboss.com</a> </span></div><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>