Class ActivitiStateHandlerRegistry
- java.lang.Object
-
- org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
-
- org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
-
- org.camunda.bpm.engine.impl.bpmn.behavior.TaskActivityBehavior
-
- org.camunda.bpm.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior
-
- 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 knownorg.camunda.bpm.engine.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
-
-
Field Summary
-
Fields inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.TaskActivityBehavior
activityInstanceId
-
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
Constructors Constructor Description ActivitiStateHandlerRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
execute(ActivityExecution execution)
Default behaviour: just leave the activity with no extra functionality.ActivitiStateHandlerRegistration
findRegistrationForProcessAndState(java.lang.String processName, java.lang.String stateName)
this scours the registry looking for candidate registrations that match a given process name and/ or state nanmejava.util.Collection<ActivitiStateHandlerRegistration>
findRegistrationsForProcessAndState(java.lang.String processName, java.lang.String stateName)
this is responsible for looking up components in the registry and returning the appropriate handler based on specificity of theorg.camunda.bpm.engine.test.spring.components.registry.ActivitiStateHandlerRegistration
void
registerActivitiStateHandler(ActivitiStateHandlerRegistration registration)
used at runtime to register state handlers as they are registered with the spring contextprotected java.lang.String
registrationKey(java.lang.String stateName, java.lang.String processName)
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
void
setBeanName(java.lang.String name)
void
setProcessEngine(ProcessEngine processEngine)
void
signal(ActivityExecution execution, java.lang.String signalName, java.lang.Object data)
-
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior
performExecution
-
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.TaskActivityBehavior
postExecution, preExecution
-
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
createCompensateEventSubscription, doLeave, executeWithErrorPropagation, isCompensationEventSubprocess, signalCompensationDone
-
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
leave, leaveIgnoreConditions
-
-
-
-
Method Detail
-
setProcessEngine
public void setProcessEngine(ProcessEngine processEngine)
-
execute
public void execute(ActivityExecution execution) throws java.lang.Exception
Description copied from class:FlowNodeActivityBehavior
Default behaviour: just leave the activity with no extra functionality.- Specified by:
execute
in interfaceActivityBehavior
- Specified by:
execute
in interfaceCoreActivityBehavior<ActivityExecution>
- Overrides:
execute
in classTaskActivityBehavior
- Throws:
java.lang.Exception
-
signal
public void signal(ActivityExecution execution, java.lang.String signalName, java.lang.Object data) throws java.lang.Exception
- Specified by:
signal
in interfaceSignallableActivityBehavior
- Overrides:
signal
in classReceiveTaskActivityBehavior
- Throws:
java.lang.Exception
-
registrationKey
protected java.lang.String registrationKey(java.lang.String stateName, java.lang.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
- theorg.camunda.bpm.engine.test.spring.components.registry.ActivitiStateHandlerRegistration
-
findRegistrationsForProcessAndState
public java.util.Collection<ActivitiStateHandlerRegistration> findRegistrationsForProcessAndState(java.lang.String processName, java.lang.String stateName)
this is responsible for looking up components in the registry and returning the appropriate handler based on specificity of theorg.camunda.bpm.engine.test.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(java.lang.String processName, java.lang.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 processstateName
- the name of the state- Returns:
- an unambiguous
org.camunda.bpm.engine.test.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 interfaceorg.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
-
setBeanName
public void setBeanName(java.lang.String name)
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
-
-