]
Kris Verlaenen updated DROOLS-2135:
-----------------------------------
Sprint: 2017 Week 45-46 (was: 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.