[jboss-jira] [JBoss JIRA] (DROOLS-2135) Rule compilation can fail when using an attribute/method of OOPath provided variable

Mario Fusco (JIRA) issues at jboss.org
Fri Nov 17 05:05:00 EST 2017


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

Mario Fusco updated DROOLS-2135:
--------------------------------
    Sprint: BxMS70-Iteration7


> Rule compilation can fail when using an attribute/method of OOPath provided variable
> ------------------------------------------------------------------------------------
>
>                 Key: DROOLS-2135
>                 URL: https://issues.jboss.org/browse/DROOLS-2135
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.4.1.Final
>            Reporter: Peter Mačkay
>            Assignee: Mario Fusco
>            Priority: Minor
>
> Having a test like this:
> https://gist.github.com/mackaypeter/d8b576ce34d42794da559308b1854aff
> Produces the following error:
> {code}
> Unable to Analyse Expression this.getName() == "joe":
> [Error: unable to resolve method using strict-mode: org.drools.compiler.oopath.MyTest$Parent.getName()]
> [Near : {... this.getName() == "joe" ....}]
>                   ^
> [Line: 4, Column: 2] : [Rule name='R']
> {code}
> It seems like it tries to look for the method definition in the Parent class instead of the Child class. The rule works correctly when there's a getName method defined in Parent. Meaning the rule compiles and fires correctly.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list