[jboss-jira] [JBoss JIRA] (DROOLS-475) Drools condition part always use MVEL strict mode (extended classes doen't get properties of super class )

Shailesh T (JIRA) issues at jboss.org
Fri May 2 04:51:57 EDT 2014


Shailesh T created DROOLS-475:
---------------------------------

             Summary: Drools condition part always use MVEL strict mode (extended classes doen't get properties of super class )
                 Key: DROOLS-475
                 URL: https://issues.jboss.org/browse/DROOLS-475
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 6.0.1.Final
         Environment: JDK 6, MVEL as default, with strict-mode set to false with file META-INF/drools.default.packagebuilder.conf with following entries

drools.dialect.default = mvel
drools.dialect.java = org.drools.compiler.rule.builder.dialect.java.JavaDialectConfiguration
drools.dialect.java.compiler = ECLIPSE

drools.dialect.mvel = org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration
drools.dialect.mvel.strict = false


            Reporter: Shailesh T
            Assignee: Mark Proctor
            Priority: Critical


Even after setting MVEL strict mode to false, condition part of drools works using strict mode and can't work with Inherited getters of HashMap (Breaks lot of working rules from 5.4) 
Error: [Error: unable to resolve method using strict-mode: defaultpkg.Test.Price()]
[Near : {... Price < 100 ....}]
...
    t: HashMap(
        Price < 11
    )
..
Does work but

import java.util.HashMap;

declare HashMap
end

declare Test extends HashMap
end

    t: Test(
        Price<100
    )

doesn't work (please see full rules in steps to reproduce)

Even condition
this["OtherPrices"]["OldPrice"] < 9 
does work for Map but not for inherited Test class
(applicable but not included in sample code to reproduce issue)




--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jboss-jira mailing list