[jboss-jira] [JBoss JIRA] (DROOLS-324) Conditional named consequences don't allow MVEL expressions in the condition of an if statement

Duncan Doyle (JIRA) jira-events at lists.jboss.org
Thu Nov 7 05:29:02 EST 2013


    [ https://issues.jboss.org/browse/DROOLS-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899555#comment-12899555 ] 

Duncan Doyle commented on DROOLS-324:
-------------------------------------

Yes, my mistake. I wrongly assumed the default dialect is MVEL. It works in my test as well when I explicitly set the dialect to MVEL.
                
> Conditional named consequences don't allow MVEL expressions in the condition of an if statement
> -----------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-324
>                 URL: https://issues.jboss.org/browse/DROOLS-324
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 6.0.0.CR5
>         Environment: Mac OS-X 10.9, JBoss Developer Studio 7, Oracle Hotspot 1.7.0_45
>            Reporter: Duncan Doyle
>            Assignee: Mario Fusco
>              Labels: conditional, consequences, drools, mvel, named
>
> See this project, which is based on the standard Sample.drl of the Drools Eclipse plugin: https://github.com/DuncanDoyle/DroolsConditionalNamedConsequenceIssue
> As you can see in the 'src/main/resources/rules/Sample.drl', the first rule, which is commented out, uses an MVEL expression in the conditional 'if' statement, i.e. "if (m.status == Message.HELLO) break [sayHello]". The compiler throws this error:
> Rule Compilation error The field DroolsTest.Message.status is not visible.
> When I use a Java dialect and define the conditional if as " if (m.getStatus() == 0) break [sayHello]", as shown in the second rule everything works fine.
> Note that there is also an issue with using public constants in the condition, but I'll open another JIRA for that issue.

--
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