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

Sonata plz.write.to at gmail.com
Fri Jul 19 04:46:17 EDT 2013


Mark Proctor wrote
> 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

Thanks Mark. So in 6.0, we are not even able to use drl functions from
another drl?
I sort of require that because I will have rules that are added to the kbase
in runtime with updated functions.

Then what about this? If I create a java class with all the static functions
wrapped in jar (instead of defining them in drl), would that be possible to
dynamically load the jar into the current kbase first and then let those
rules added in runtime to use functions from that jar by simply adding
import function mydynamicjar.MyFunc.*; ?

A simple code snippet on how to achieve that would be nice, thanks a lot!






--
View this message in context: http://drools.46999.n3.nabble.com/Importing-functionS-from-another-drl-in-5-5-0-tp4025050p4025053.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list