[jboss-jira] [JBoss JIRA] Created: (JBRULES-3089) position of "dialect 'mvel'" affects function and/or rule parsing (NPE)

Wolfgang Laun (JIRA) jira-events at lists.jboss.org
Tue Jun 21 06:00:24 EDT 2011


position of "dialect 'mvel'" affects function and/or rule parsing (NPE)
-----------------------------------------------------------------------

                 Key: JBRULES-3089
                 URL: https://issues.jboss.org/browse/JBRULES-3089
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler (expert)
    Affects Versions: 5.2.0.CR1
            Reporter: Wolfgang Laun
            Assignee: Mark Proctor
             Fix For: 5.2.0


The DRL shown below does not compile. Exchanging dialect and function fixes the problem, as does removing the dialect stmt. entirely.

dialect "mvel"

function boolean ping( String x ){
    System.out.println( "ping " + x );
    return true;
}

rule exa4
when
    eval( ping("A") )
then
    System.out.println( "Hello world!" );
end

Unable to Analyse Expression ping("A"):
[Error: unable to resolve method using strict-mode: java.lang.Object.ping(java.lang.String)]
[Near : {... ping("A") ....}]
             ^
[Line: 1, Column: 1] : [Rule name='exa4']

Unable to build expression for 'eval':null 'ping("A")' : [Rule name='exa4']
java.lang.NullPointerException


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list