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

Mario Fusco (JIRA) issues at jboss.org
Tue May 6 10:39:57 EDT 2014


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

Mario Fusco resolved DROOLS-475.
--------------------------------

    Fix Version/s: 6.1.0.Beta4
       Resolution: Done


> 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: Mario Fusco
>            Priority: Critical
>              Labels: drools, mvel, strict-mode
>             Fix For: 6.1.0.Beta4
>
>         Attachments: BasicInclude.drl
>
>
> 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, added drl for this as attachment)



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


More information about the jboss-jira mailing list