4.8. Middleware Beans Methods Invocation
The Service task node is used to invoke a service method. Activiti engine is integrated with the Spring framework, so you can access middleware beans by their names. To invoke a method of a Spring bean use the following expression to the Expression field:
${beanName.methodName(processVarName, 'someStringParam')}
You can use process variables as method arguments, including the variables automatically created on process start (entityId
, bpmProcInstanceId
, etc. as described in ProcessRuntimeService).