05-09-2019 05:16 PM
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">
</bean>
Task is defined in BPMN this way:
<serviceTask id="myServiceTask" name="My Task" activiti:delegateExpression="myJavaDelegateId">
</serviceTask>
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 ?
Thanks.
05-10-2019 10:10 AM
Here is the solution:
https://stackoverflow.com/questions/7899790/calling-spring-bean-from-alfresco-activiti-process
Bean id must be added to the config of activitiBeanRegistry that define the list of visible beans in expressions.
I did not found anything about this in activiti doc.
Is this needed only when activiti is integrated into Alfresco repo ?
05-10-2019 10:10 AM
Here is the solution:
https://stackoverflow.com/questions/7899790/calling-spring-bean-from-alfresco-activiti-process
Bean id must be added to the config of activitiBeanRegistry that define the list of visible beans in expressions.
I did not found anything about this in activiti doc.
Is this needed only when activiti is integrated into Alfresco repo ?
Explore our Alfresco products with the links below. Use labels to filter content by product module.