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 java.lang.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
Fields Modifier and Type Field Description protected ProcessEngine
processEngine
injected reference - can be obtained via aProcessEngineFactoryBean
-
Constructor Summary
Constructors Constructor Description ProcessStartingMethodInterceptor(ProcessEngine processEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
invoke(org.aopalliance.intercept.MethodInvocation invocation)
protected java.lang.String
processBusinessKey(org.aopalliance.intercept.MethodInvocation invocation)
protected java.util.Map<java.lang.String,java.lang.Object>
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 Detail
-
processEngine
protected ProcessEngine processEngine
injected reference - can be obtained via aProcessEngineFactoryBean
-
-
Constructor Detail
-
ProcessStartingMethodInterceptor
public ProcessStartingMethodInterceptor(ProcessEngine processEngine)
- Parameters:
processEngine
- takes a reference to aProcessEngine
-
-
Method Detail
-
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws java.lang.Throwable
- Specified by:
invoke
in interfaceorg.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable
-
processBusinessKey
protected java.lang.String processBusinessKey(org.aopalliance.intercept.MethodInvocation invocation) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
processVariablesFromAnnotations
protected java.util.Map<java.lang.String,java.lang.Object> processVariablesFromAnnotations(org.aopalliance.intercept.MethodInvocation invocation) throws java.lang.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:
java.lang.Throwable
- thrown anything goes wrong
-
-