Am 30.05.2011 13:52, schrieb Küng Sabrina: > Hello > > How can I write a rule, that can be used in several other packages > resp. rulesets without copying the code?
Hi Sabrina, the basic solution is to pre-compile the rule into a *.pkg file and load this file into any number of KnowledgeBase instances, then execute your sessions against the respective knowledge base(s). If you want to use declared types from a shared source code file, make sure to compile them into a binary and always load them from this single binary, since AFAICT otherwise the underlying java beans will belong to different ClassLoaders and thus lead to problems (AFAICT) at runtime. I'm working on a maven plugin which supports binary reuse of drools rules, plus automatic dependency resolution between JARs and pre-compiled knowledge modules. The web site for this plugin is located here, but is currently really out of date: http://passion.forco.de/content/maven-drools-plugin A working plugin should be available shortly, and of course documentation will be updated accordingly. You might want to bookmark this page or subscribe to the RSS feed. Best regards Ansgar > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users