-
Bug
-
Resolution: Done
-
Major
-
6.4.0.Beta1
-
None
-
-
NEW
-
NEW
KieBase 'includes' does not handle the inclusion of KieBases that use the same package-names correctly.
I define 2 KJARs, each with a kmodule.xml that defines a KieBase. KJAR1 has a dependency on KJAR2 in its pom.xml.
The KieBase defined in KJAR1 includes the KieBase defined in KJAR2.
If the KieBases get their Drools Resources (e.g. .drl) from different packages (e.g. 'rules' and 'rules2', everything works fine, e.g.:
KJAR1 kmodule.xml:
<?xml version="1.0" encoding="UTF-8"?> <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="kbase1" equalsBehavior="equality" default="true" packages="rules" includes="kbase2"> <ksession name="ksession1" default="true" type="stateful"/> </kbase> </kmodule>
KAJR2 kmodule.xml:
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="kbase2" equalsBehavior="equality" default="false" packages="rules2"> <ksession name="ksession2" default="false" type="stateful"/> </kbase> </kmodule>
However, when both KieBases use the same "packages" name (e.g. 'rules'), only one of the resources gets included in the final KieBase.
KJAR1 kmodule.xml:
<?xml version="1.0" encoding="UTF-8"?> <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="kbase1" equalsBehavior="equality" default="true" packages="rules" includes="kbase2"> <ksession name="ksession1" default="true" type="stateful"/> </kbase> </kmodule>
KAJR2 kmodule.xml:
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="kbase2" equalsBehavior="equality" default="false" packages="rules"> <ksession name="ksession2" default="false" type="stateful"/> </kbase> </kmodule>
Unit tests with reproducer can be found here: https://github.com/DuncanDoyle/drools-kiebase-include-issue