-
Bug
-
Resolution: Done
-
Major
-
7.3.0.Final
-
None
-
2017 Week 38-39
-
-
NEW
-
NEW
I am working on a multi-module BRMS project, with each module encapsulating a set of rules forming a single knowledge base. There is an empty "packaging" module which inherits each of these modules in order to generate a single KJAR for deployment purposes. The application then utilises this KJAR via the KieScanner/ReleaseId approach to facilitate dynamic rule loading at runtime and decoupling of application/rules.
Having taken the above approach I have encountered an issue when including knowledge bases that contain rule templates. Drools is unable to build these knowledge bases, reporting duplicate rule names; it appears to believe that the rules exist in both the inheriting and inherited knowledge bases. This behaviour is not seen when including knowledge bases containing standard rules or decision tables - just rule templates.
An example of the error reported is:
{{4528 [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - KieModule was added: ZipKieModule[releaseId=my.drools.templates:ruleModuleOne:1.0-SNAPSHOT,file=C:\Users\black\.m2\repository\my\drools\templates\ruleModuleOne\1.0-SNAPSHOT\ruleModuleOne-1.0-SNAPSHOT.jar]
5145 [main] ERROR org.drools.compiler.kie.builder.impl.KieProject - Unable to build KieBaseModel:ruleModule_1_kbase
[7,4]: Duplicate rule name: Rule One :: CCC_4
[15,4]: Duplicate rule name: Rule One :: BBB_3
[23,4]: Duplicate rule name: Rule One :: AAA_2
[7,4]: Duplicate rule name: Rule Two :: EEE_3
[16,4]: Duplicate rule name: Rule Two :: DDD_2
5329 [main] ERROR org.drools.compiler.kie.builder.impl.KieProject - Unable to build KieBaseModel:inheritedTemplateModules-ruleModule_1_kbase
[7,4]: Duplicate rule name: Rule One :: CCC_4
[15,4]: Duplicate rule name: Rule One :: BBB_3
[23,4]: Duplicate rule name: Rule One :: AAA_2
[7,4]: Duplicate rule name: Rule Two :: EEE_3
[16,4]: Duplicate rule name: Rule Two :: DDD_2
}}