Java task field injection works when java class is on the Spring context
------------------------------------------------------------------------
Key: JBPM-2789
URL:
https://jira.jboss.org/jira/browse/JBPM-2789
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.1
Environment: Nothing unusual, hsql, jetty.
Reporter: Robert Moskal
If I create a java task that pulls from the spring context, like so:
<java expr="#{pipelineNode}" g="300,79,92,52"
method="execute" name="Rig">
<field name="execution"><object
expr="#{execution}"/></field>
<field name="allowableFlows"><string
value="NormalFlow2"/></field>
<transition g="-31,-28" name="success" to="Animate"/>
<transition g="303,252:-25,-32" name="to Rework"
to="Rework"/>
</java>
Then none of the field injectors work. However if I change the definition to one where I
instantiate using the class:
<java class="com.bluesky.skyline.workflow.extensions.PipelineNode"
g="123,78,127,52" method="execute" name="Model">
<!--<field name="execution"><object
expr="#{execution}"/></field>-->
<field name="allowableFlows"><string
value="NormalFlow2"/></field>
<transition g="-31,-28" name="success" to="Rig"/>
<transition g="-24,-58" name="to Rework"
to="Rework"/>
</java>
Then they work as expected. Whats' interesting is that in the latter case the
Execution isn't injected.However, if I add the execution in an argument to my method:
<arg><object expr="#{execution}"/></arg>
Then it is passed in correctly. I suspect this has to do with the way the java code is
stored with the process.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira