public class ProcessStartingMethodInterceptor extends Object implements org.aopalliance.intercept.MethodInterceptor
MethodInterceptor
that starts a business process
as a result of a successful method invocation.Modifier and Type | Field and Description |
---|---|
protected ProcessEngine |
processEngine
injected reference - can be obtained via a
ProcessEngineFactoryBean |
Constructor and Description |
---|
ProcessStartingMethodInterceptor(ProcessEngine processEngine) |
Modifier and Type | Method and Description |
---|---|
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
protected String |
processBusinessKey(org.aopalliance.intercept.MethodInvocation invocation) |
protected Map<String,Object> |
processVariablesFromAnnotations(org.aopalliance.intercept.MethodInvocation invocation)
if there any arguments with the
org.camunda.bpm.engine.annotations.ProcessVariable annotation,
then we feed those parameters into the business process |
protected ProcessEngine processEngine
ProcessEngineFactoryBean
public ProcessStartingMethodInterceptor(ProcessEngine processEngine)
processEngine
- takes a reference to a ProcessEngine
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke
in interface org.aopalliance.intercept.MethodInterceptor
Throwable
protected String processBusinessKey(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
Throwable
protected Map<String,Object> processVariablesFromAnnotations(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
org.camunda.bpm.engine.annotations.ProcessVariable
annotation,
then we feed those parameters into the business processinvocation
- the invocation of the method as passed to the MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
methodThrowable
- thrown anything goes wrongCopyright © 2015. All rights reserved.