org.camunda.bpm.engine.spring.components.aop
Class ProcessStartingMethodInterceptor

java.lang.Object
  extended by 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
protected  ProcessEngine processEngine
          injected reference - can be obtained via a ProcessEngineFactoryBean
 
Constructor Summary
ProcessStartingMethodInterceptor(ProcessEngine processEngine)
           
 
Method Summary
 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 annotations.ProcessVariable annotation, then we feed those parameters into the business process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processEngine

protected ProcessEngine processEngine
injected reference - can be obtained via a ProcessEngineFactoryBean

Constructor Detail

ProcessStartingMethodInterceptor

public ProcessStartingMethodInterceptor(ProcessEngine processEngine)
Parameters:
processEngine - takes a reference to a ProcessEngine
Method Detail

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
              throws Throwable
Specified by:
invoke in interface org.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 the annotations.ProcessVariable annotation, then we feed those parameters into the business process

Parameters:
invocation - the invocation of the method as passed to the MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) method
Returns:
returns the map of process variables extracted from the parameters
Throws:
Throwable - thrown anything goes wrong


Copyright © 2017 camunda services GmbH. All rights reserved.