cancel
Showing results for 
Search instead for 
Did you mean: 

JavaDelegate - obtaining a reference to a spring bean

dva-developer
Champ in-the-making
Champ in-the-making
I am a developer on a large scale spring mvc application. This project is a multi module Maven application deploying as an EAR.
We are interested in integrating Activiti within this project.  As a starting point we want to deploy Activity as an embedded process and through a single serviceTask, call a simple business service within our application that is described in a spring bean.

To support this task we have created a JavaDelegate class and have successfully passed processVariables as part of the
runtimeService.startProcessInstanceByKey().  The JavaDelegate class is coded to capture the required variables from the DelegateExecution object and are used as parameters in a method exposed by the simple business service.

Our problem is we are having a hard time getting  a reference to this simple business service which is wired throughout our application as a spring bean.  Is there a tutorial or a reference that can describe all of the working parts (spring-config.xml, bpmn20.xml and
JavaDelegate class) to enable our JavaDelegate to reference this service bean or can someone provide some insight in resolving this issue? 
Thanks much.
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I thing you have read http://www.activiti.org/userguide/#springintegration already.
There is another example in activiti sources  (jUnit test - with config and process definition)
org.activiti.spring.test.servicetask.ServiceTaskSpringDelegationTest#testDelegateExpression

Regards
Martin