[jboss-jira] [JBoss JIRA] (DROOLS-665) Cannot extends rule from another one with the same package name

Davide Sottara (JIRA) issues at jboss.org
Mon Dec 15 17:17:29 EST 2014


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

Davide Sottara commented on DROOLS-665:
---------------------------------------

We know that the extension mechanism is not perfect, to this date you can only extend rules within the same package. 
This mechanism, however, should work even across mutiple drls - see the unit tests in 
https://github.com/droolsjbpm/drools/blob/dd59435b623cc5dfdbb3ba9b0ff18b187fc3bc79/drools-compiler/src/test/java/org/drools/compiler/integrationtests/RuleExtensionTest.java

This said, in your reproducer the base rule is called "Parend" while the child extends "parent". 
Since the mechanism uses string comparison, please double check the spelling in your original rulebase or submit a full reproducer.
I will close this ticket for now, feel free to reopen it if you can isolate the problem.
Best
Davide



> Cannot extends rule from another one with the same package name
> ---------------------------------------------------------------
>
>                 Key: DROOLS-665
>                 URL: https://issues.jboss.org/browse/DROOLS-665
>             Project: Drools
>          Issue Type: Bug
>    Affects Versions: 6.0.0.Final, 6.2.0.CR3
>            Reporter: Yacine Jaber
>            Assignee: Mark Proctor
>         Attachments: wod-drools-test.7z
>
>
> When I extends a rule from another one with the same package, but into two differents .drl files. I got the following message :
> Unable to resolve parent rule, please check that both rules are in the same package.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list