[
https://issues.jboss.org/browse/JBRULES-3089?page=com.atlassian.jira.plug...
]
Geoffrey De Smet updated JBRULES-3089:
--------------------------------------
Fix Version/s: 5.4.0.Beta1
(was: 5.3.0.Final)
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: Edson Tirelli
Fix For: 5.4.0.Beta1
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.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira