[jboss-user] [jBPM] New message: "BPMN 2.0 Service Task"
David Geary
do-not-reply at jboss.com
Thu Feb 25 12:21:57 EST 2010
User development,
A new message was posted in the thread "BPMN 2.0 Service Task":
http://community.jboss.org/message/528567#528567
Author : David Geary
Profile : http://community.jboss.org/people/david_geary
Message:
--------------------------------------------------------------
In the BPMN service task in JBPM 4.3 you define the service operation to call as (eg from the example)
<bpmn:interface id="myInterface" name="org.jbpm.examples.bpmn.task.service.JavaService">
<bpmn:operation id="myOperation" name="myMethod">
<bpmn:inMessageRef>inputMessage</bpmn:inMessageRef>
<bpmn:outMessageRef>outputMessage</bpmn:outMessageRef>
</bpmn:operation>
</bpmn:interface>
>From what I can see in the example unit test this creates a new instance of the specified java class (JavaService) when the process executes, in fact if you call the method twice it creates the object twice.
Surely a service is more likely to have a lifecycle external to the process? How can I 'inject' a prexisting service instance into the process? Specifically is it possible to access externally defined spring beans?
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528567#528567
More information about the jboss-user
mailing list