Package scoped means that the function can only be used within the same rule package. The package may be split across multiple DRLs, but as long as in the same package, all would be able to access the function. See documentation for more info<br>
<br><a href="https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e4032">https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e4032</a><br>
<br><br><div class="gmail_quote">On Tue, Apr 14, 2009 at 6:32 PM, dhai <span dir="ltr">&lt;<a href="mailto:sdhari@hotmail.com">sdhari@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks Mark.<br>
<br>
What do you mean by package scoped? In my scenario I have all rules with<br>
same package declaration but in various .DRL files. Is it possible I create<br>
common function in one file and use them in others? If yes, please write<br>
some code to explain it.<br>
<br>
We do not want to use Java static method as we have 2 different projects,<br>
one for authoring the rules and another business application will use the<br>
rules. By creating faction in Java classes add dependencies for the rules.<br>
We will need to deploy Java classes with the rules.<br>
<br>
<br>
Mark Proctor wrote:<br>
&gt;<br>
&gt; dhai wrote:<br>
&gt;&gt; Is it possible to create functions global and call them from various .drl<br>
&gt;&gt; files? I have common code that I want to call from various consequences<br>
&gt;&gt; of<br>
&gt;&gt; rules written in separate .drl files. I do not want to write helper Java<br>
&gt;&gt; class.<br>
&gt;&gt;<br>
&gt; functions are currently scoped to their package namespace. You can<br>
&gt; always use static methods on a class in external java code and import<br>
&gt; those from any .drl.<br>
&gt;<br>
&gt; Mark<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/How-to-create-global-functions--tp23031639p23049316.html" target="_blank">http://www.nabble.com/How-to-create-global-functions--tp23031639p23049316.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<br>
<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>
</font></blockquote></div><br>