An environment variable cannot be injected into Rules and BPMN implementations. Environment variables are referenced with an "env." prefix. The dot in the prefix causes the problem. MVEL is used for resolution of an expression in the from attribute of:
<rules:global from="env.myEnvProperty" to="myEnvProperty"/>
However, MVEL interprets the expression as "invoke the myEnvProperty on the object env. And following expression is thrown:
org.switchyard.HandlerException: [Error: null pointer: env.basicEnvironment]
As far as I know, MVEL does not support escaping of a dot. I have already discussed this limitation with David Ward. The purpose of this JIRA is to document the limitation. It could be also mentioned in the docs. Workarounds exist, so setting minor priority.
|