I want to use a Spring bean as a java-delegate in my Service task.
The java-delegate is defined in Spring context file:
<bean id="myJavaDelegateId" class="my.package.myJavaDelegate" init-method="init">
Task is defined in BPMN this way:
<serviceTask id="myServiceTask" name="My Task" activiti:delegateExpression="myJavaDelegateId">
When task is executed, I got the following error:
"Delegate expression myJavaDelegateId did neither resolve to an implementation of interface org.activiti.engine.impl.pvm.delegate.ActivityBehavior nor interface org.activiti.engine.delegate.JavaDelegate"
It seems that the Spring bean is not resolved at runtime (I got the same result when using a fake bean id in BPMN).
Any idea ?