org.camunda.bpm.engine.spring.components.registry
Class ActivitiStateHandlerRegistry

java.lang.Object
  extended by org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
      extended by org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
          extended by org.camunda.bpm.engine.impl.bpmn.behavior.TaskActivityBehavior
              extended by org.camunda.bpm.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior
                  extended by org.camunda.bpm.engine.spring.components.registry.ActivitiStateHandlerRegistry
All Implemented Interfaces:
CoreActivityBehavior<ActivityExecution>, ActivityBehavior, SignallableActivityBehavior, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

public class ActivitiStateHandlerRegistry
extends ReceiveTaskActivityBehavior
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, ActivityBehavior, org.springframework.beans.factory.InitializingBean

this class records and manages all known annotations.State - responding beans in the JVM. It should have metadata on all methods, and what those methods expect from a given invocation (ie: which process, which process variables).

Since:
1.0
Author:
Josh Long

Nested Class Summary
 
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
AbstractBpmnActivityBehavior.ErrorDeclarationForProcessInstanceFinder, AbstractBpmnActivityBehavior.ErrorPropagationException
 
Field Summary
 
Fields inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
LOG
 
Fields inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
bpmnActivityBehavior
 
Constructor Summary
ActivitiStateHandlerRegistry()
           
 
Method Summary
 void afterPropertiesSet()
           
 void execute(ActivityExecution execution)
           
 ActivitiStateHandlerRegistration findRegistrationForProcessAndState(String processName, String stateName)
          this scours the registry looking for candidate registrations that match a given process name and/ or state nanme
 Collection<ActivitiStateHandlerRegistration> findRegistrationsForProcessAndState(String processName, String stateName)
          this is responsible for looking up components in the registry and returning the appropriate handler based on specificity of the spring.components.registry.ActivitiStateHandlerRegistration
 void registerActivitiStateHandler(ActivitiStateHandlerRegistration registration)
          used at runtime to register state handlers as they are registered with the spring context
protected  String registrationKey(String stateName, String processName)
           
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setBeanName(String name)
           
 void setProcessEngine(ProcessEngine processEngine)
           
 void signal(ActivityExecution execution, String signalName, Object data)
           
 
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
checkIfCauseOfExceptionIsBpmnError, createCompensateEventSubscription, executeWithErrorPropagation, isCompensationEventSubprocess, isProcessEngineExceptionWithoutCause, isTransactionNotActive, leave, propagateBpmnError, propagateError, propagateException, propagateExceptionAsError, signalCompensationDone
 
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
leaveIgnoreConditions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivitiStateHandlerRegistry

public ActivitiStateHandlerRegistry()
Method Detail

setProcessEngine

public void setProcessEngine(ProcessEngine processEngine)

execute

public void execute(ActivityExecution execution)
             throws Exception
Specified by:
execute in interface CoreActivityBehavior<ActivityExecution>
Specified by:
execute in interface ActivityBehavior
Overrides:
execute in class ReceiveTaskActivityBehavior
Throws:
Exception

signal

public void signal(ActivityExecution execution,
                   String signalName,
                   Object data)
            throws Exception
Specified by:
signal in interface SignallableActivityBehavior
Overrides:
signal in class ReceiveTaskActivityBehavior
Throws:
Exception

registrationKey

protected String registrationKey(String stateName,
                                 String processName)

registerActivitiStateHandler

public void registerActivitiStateHandler(ActivitiStateHandlerRegistration registration)
used at runtime to register state handlers as they are registered with the spring context

Parameters:
registration - the spring.components.registry.ActivitiStateHandlerRegistration

findRegistrationsForProcessAndState

public Collection<ActivitiStateHandlerRegistration> findRegistrationsForProcessAndState(String processName,
                                                                                        String stateName)
this is responsible for looking up components in the registry and returning the appropriate handler based on specificity of the spring.components.registry.ActivitiStateHandlerRegistration

Parameters:
processName - the process name to look for (optional)
stateName - the state name to look for (not optional)
Returns:
all matching options

findRegistrationForProcessAndState

public ActivitiStateHandlerRegistration findRegistrationForProcessAndState(String processName,
                                                                           String stateName)
this scours the registry looking for candidate registrations that match a given process name and/ or state nanme

Parameters:
processName - the name of the process
stateName - the name of the state
Returns:
an unambiguous spring.components.registry.ActivitiStateHandlerRegistry or null

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

setBeanName

public void setBeanName(String name)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2016 camunda services GmbH. All rights reserved.