[rules-users] Importing functionS from another drl in 5.5.0

Mark Proctor mproctor at codehaus.org
Fri Jul 19 02:28:57 EDT 2013


Unfortunately not, and in 6.0 that won't be possible as there is stricter class loader isolation between drl namespace files (limitation of a dynamic system on the JVM). However functions are just static java methods, and those work fine too, when defined on a class in the parent class loader.

Mark
On 19 Jul 2013, at 06:07, Sonata <plz.write.to at gmail.com> wrote:

> If you have defined functions in a drl, in order to use those functions in
> another drl of a different package, you will have to import each individual
> function, like
> package A;
> function void func1 () {
>  System.out.println("Hello");
> }
> function void func2 () {
>  System.out.println("There");
> }
> 
> pacakge B;
> import function A.func1.func1;
> import function A.func2.func2;
> 
> rule Test
> when
> then func1(); func2(); end
> 
> Is there any way to do something like import function A.*; in Drools 5.5.0
> to use all the functions defined in another drl?
> 
> Thank you
> 
> 
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/Importing-functionS-from-another-drl-in-5-5-0-tp4025050.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list