[rules-users] Deploy Rules in separate OSGi bundles

Charles Moulliard ch007m at gmail.com
Tue May 13 09:46:22 EDT 2014


Can you share your code as I have created such kind of project (bundle A  =
KieContainer  and bundle B = rules) which is working on Karaf ?

https://github.com/cmoulliard/droolsjbpm-osgi-examples (bundle with Kie =
kie-project-bundle<https://github.com/cmoulliard/droolsjbpm-osgi-examples/tree/master/kie-project-bundle>
and
bundle with bundle with rules =
simple-kie-bundle<https://github.com/cmoulliard/droolsjbpm-osgi-examples/tree/master/simple-kie-bundle>
)


On Tue, May 13, 2014 at 9:39 AM, Ephemeris Lappis <
ephemeris.lappis at gmail.com> wrote:

> Hello.
>
> I'd like to separate cleanly my Drools system into 2 OSGi bundles :
>
> 1) the java code that uses the Kie API (6.0.1) and exposes service
> interfaces to the business part of the applications. Its code relies on
> someting like :
>
> KieServices kieServices = KieServices.Factory.get();
> kieContainer = kieServices.getKieClasspathContainer();
> KieSession kieSession = kieContainer.newKieSession(name);
>
> 2) the rules themselves, just including the kmodule.xml that manages the
> ksessions and the drl files in their own packages.
>
> Let say the first module is S and second is R, while the applcation is A.
>
> This build model works nice in my eclipse with correct maven dependancies
> set from A to both S and R. Classes in the application A calls the service
> from the S. The kieContainer has resolved as expected the kmodule and
> associated the rules files for the given packages, and the application can
> get the ksession for a given name.
>
> I'm afraid that the same code won't run as nice as it does when deployed on
> my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer
> may
> encounter some troubles to detect the kmodule.xml in the META-INF and the
> DRL files out of another jar.
>
> Is there anyone with such experiences ?
> Any advice to do it ?
>
> Thanks in advance.
> Regards.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.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
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140513/c77d4022/attachment.html 


More information about the rules-users mailing list