[jboss-jira] [JBoss JIRA] (DROOLS-1744) Inclusion of kbases containing rule templates results in duplicate rule names and kbase build failure.

Mario Fusco (JIRA) issues at jboss.org
Wed Sep 27 09:58:00 EDT 2017


    [ https://issues.jboss.org/browse/DROOLS-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469307#comment-13469307 ] 

Mario Fusco commented on DROOLS-1744:
-------------------------------------

Can you please provide a reproducer of this issue?

> Inclusion of kbases containing rule templates results in duplicate rule names and kbase build failure.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-1744
>                 URL: https://issues.jboss.org/browse/DROOLS-1744
>             Project: Drools
>          Issue Type: Bug
>          Components: decision tables
>    Affects Versions: 7.3.0.Final
>            Reporter: Alistair Black
>            Assignee: Mario Fusco
>
> 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
> }}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list