Class ProcessStartingMethodInterceptor
java.lang.Object
org.camunda.bpm.engine.spring.components.aop.ProcessStartingMethodInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice
,org.aopalliance.intercept.Interceptor
,org.aopalliance.intercept.MethodInterceptor
public class ProcessStartingMethodInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor
MethodInterceptor
that starts a business process
as a result of a successful method invocation.- Author:
- Josh Long
-
Field Summary
Modifier and TypeFieldDescriptionprotected ProcessEngine
injected reference - can be obtained via aProcessEngineFactoryBean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioninvoke
(org.aopalliance.intercept.MethodInvocation invocation) protected String
processBusinessKey
(org.aopalliance.intercept.MethodInvocation invocation) processVariablesFromAnnotations
(org.aopalliance.intercept.MethodInvocation invocation) if there any arguments with theorg.camunda.bpm.engine.annotations.ProcessVariable
annotation, then we feed those parameters into the business process
-
Field Details
-
processEngine
injected reference - can be obtained via aProcessEngineFactoryBean
-
-
Constructor Details
-
ProcessStartingMethodInterceptor
- Parameters:
processEngine
- takes a reference to aProcessEngine
-
-
Method Details
-
invoke
- Specified by:
invoke
in interfaceorg.aopalliance.intercept.MethodInterceptor
- Throws:
Throwable
-
processBusinessKey
protected String processBusinessKey(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable - Throws:
Throwable
-
processVariablesFromAnnotations
protected Map<String,Object> processVariablesFromAnnotations(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable if there any arguments with theorg.camunda.bpm.engine.annotations.ProcessVariable
annotation, then we feed those parameters into the business process- Parameters:
invocation
- the invocation of the method as passed to theMethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
method- Returns:
- returns the map of process variables extracted from the parameters
- Throws:
Throwable
- thrown anything goes wrong
-