[jboss-jira] [JBoss JIRA] (DROOLS-330) Rule Inheritance using Extends keyword fails when the Sub Rule Appears before the Super Rule

Mario Fusco (JIRA) jira-events at lists.jboss.org
Wed Nov 13 03:46:06 EST 2013


     [ https://issues.jboss.org/browse/DROOLS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco reassigned DROOLS-330:
----------------------------------

    Assignee: Mario Fusco  (was: Mark Proctor)

    
> Rule Inheritance using Extends keyword fails when the Sub Rule Appears before the Super Rule
> --------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-330
>                 URL: https://issues.jboss.org/browse/DROOLS-330
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.5.0.Final
>         Environment: Ubuntu 12.04 LTS in VM
>            Reporter: Mike Fauzy
>            Assignee: Mario Fusco
>            Priority: Minor
>
> In Drools 5.5.0.Final the extends keyword allows one rule (SubRule) to extend another rule (SuperRule). SubRule should only fire if all of the conditions for SubRule and SuperRule are met. 
> If SubRule is listed after SuperRule after in the .drl file, then it works correctly. However, if SubRule is listed before SuperRule in the .drl file, then only the SubRule's conditions need to be met for the rule to fire. 
> A temporary workaround is to list all SubRules after the SuperRules. 
> This might be related to: https://issues.jboss.org/browse/DROOLS-100
> To reproduce:
> I have a junit test packaged for Maven and Eclipse, but I don't see any place to add the file.
> Create 2 .drl files where rule "sub" extends rule "super". Setup a boolean that is true for the sub, but false for the super. 
> In the first file, place the sub before the super. In the second file, reverse the two. 
> Observe that the sub fires when it is in the file before the super, but not after. It should not fire either time. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list