Class ActivitiEventBuilder
java.lang.Object
org.activiti.engine.delegate.event.impl.ActivitiEventBuilder
Builder class used to create
ActivitiEvent implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ActivitiSignalEventcreateActivitiySignalledEvent(DelegateExecution execution, String signalName, Object payload) createActivityCancelledEvent(String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, String activityType, Object cause) createActivityCancelledEvent(ExecutionEntity execution, Object cause) static ActivitiActivityEventcreateActivityEvent(ActivitiEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, org.activiti.bpmn.model.FlowElement flowElement) static ActivitiActivityEventcreateActivityEvent(ActivitiEventType type, DelegateExecution execution, org.activiti.bpmn.model.FlowElement flowElement) static ActivitiEntityEventcreateEntityEvent(ActivitiEventType type, Object entity) static ActivitiEntityEventcreateEntityEvent(ActivitiEventType type, Object entity, String executionId, String processInstanceId, String processDefinitionId) static ActivitiEventcreateEntityEventWithActor(ActivitiEventType type, ExecutionEntity entity, String actor) static ActivitiEntityEventcreateEntityExceptionEvent(ActivitiEventType type, Object entity, Throwable cause) static ActivitiEntityEventcreateEntityExceptionEvent(ActivitiEventType type, Object entity, Throwable cause, String executionId, String processInstanceId, String processDefinitionId) createEntityWithVariablesEvent(ActivitiEventType type, Object entity, Map variables, boolean localScope) static ActivitiErrorEventcreateErrorEvent(ActivitiEventType type, String activityId, String errorId, String errorCode, String executionId, String processInstanceId, String processDefinitionId) static ActivitiEventcreateEvent(ActivitiEventType type, String executionId, String processInstanceId, String processDefinitionId) static ActivitiEventstatic ActivitiMembershipEventcreateMembershipEvent(ActivitiEventType type, String groupId, String userId) static ActivitiMessageEventcreateMessageReceivedEvent(DelegateExecution execution, String messageName, String correlationKey, Object payload) static ActivitiMessageEventcreateMessageSentEvent(DelegateExecution execution, String messageName, String correlationKey, Object payload) static ActivitiMessageEventcreateMessageWaitingEvent(DelegateExecution execution, String messageName, String correlationKey) createProcessCancelledEvent(ProcessInstance processInstance, Object cause) static ActivitiProcessStartedEventcreateProcessStartedEvent(Object entity, Map variables, boolean localScope) static ActivitiProcessStartedEventcreateProcessStartedEvent(Object entity, Map variables, boolean localScope, String linkedProcessInstanceId, String linkedProcessInstanceType) createSequenceFlowTakenEvent(ExecutionEntity executionEntity, ActivitiEventType type, String sequenceFlowId, String sourceActivityId, String sourceActivityName, String sourceActivityType, Object sourceActivityBehavior, String targetActivityId, String targetActivityName, String targetActivityType, Object targetActivityBehavior) static ActivitiVariableEventcreateVariableEvent(ActivitiEventType type, String variableName, Object variableValue, VariableType variableType, String taskId, String executionId, String processInstanceId, String processDefinitionId) createVariableUpdateEvent(VariableInstanceEntity variableInstance, Object previousValue, String processInstanceId, String processDefinitionId) protected static StringmayBeResolveExpression(String expression, DelegateExecution execution) protected static StringparseActivityBehavior(org.activiti.bpmn.model.FlowNode flowNode) protected static StringparseActivityType(org.activiti.bpmn.model.FlowNode flowNode) protected static voidprotected static voidpopulateEventWithCurrentContextAndActor(ActivitiEventImpl event, String actor)
-
Constructor Details
-
ActivitiEventBuilder
public ActivitiEventBuilder()
-
-
Method Details
-
createGlobalEvent
- Parameters:
type- type of event- Returns:
- an
ActivitiEventthat doesn't have it's execution context-fields filled, as the event is a global event, independent of any running execution.
-
createEvent
public static ActivitiEvent createEvent(ActivitiEventType type, String executionId, String processInstanceId, String processDefinitionId) -
createEntityEvent
- Parameters:
type- type of evententity- the entity this event targets- Returns:
- an
ActivitiEntityEvent. In case anExecutionContextis active, the execution related event fields will be populated. If not, execution details will be retrieved from theObjectif possible.
-
createProcessStartedEvent
public static ActivitiProcessStartedEvent createProcessStartedEvent(Object entity, Map variables, boolean localScope) - Parameters:
entity- the entity this event targetsvariables- the variables associated with this entity- Returns:
- an
ActivitiEntityEvent. In case anExecutionContextis active, the execution related event fields will be populated. If not, execution details will be reteived from theObjectif possible.
-
createProcessStartedEvent
public static ActivitiProcessStartedEvent createProcessStartedEvent(Object entity, Map variables, boolean localScope, String linkedProcessInstanceId, String linkedProcessInstanceType) - Parameters:
entity- the entity this event targetsvariables- the variables associated with this entitylinkedProcessInstanceId- the id of the linked process instancelinkedProcessInstanceType- the type of the linked process instance- Returns:
- an
ActivitiProcessStartedEvent. In case anExecutionContextis active, the execution related event fields will be populated. If not, execution details will be retrieved from theObjectif possible.
-
createEntityWithVariablesEvent
public static ActivitiEntityWithVariablesEvent createEntityWithVariablesEvent(ActivitiEventType type, Object entity, Map variables, boolean localScope) - Parameters:
type- type of evententity- the entity this event targetsvariables- the variables associated with this entity- Returns:
- an
ActivitiEntityEvent. In case anExecutionContextis active, the execution related event fields will be populated. If not, execution details will be retrieved from theObjectif possible.
-
createSequenceFlowTakenEvent
public static ActivitiSequenceFlowTakenEvent createSequenceFlowTakenEvent(ExecutionEntity executionEntity, ActivitiEventType type, String sequenceFlowId, String sourceActivityId, String sourceActivityName, String sourceActivityType, Object sourceActivityBehavior, String targetActivityId, String targetActivityName, String targetActivityType, Object targetActivityBehavior) -
createEntityEvent
public static ActivitiEntityEvent createEntityEvent(ActivitiEventType type, Object entity, String executionId, String processInstanceId, String processDefinitionId) - Parameters:
type- type of evententity- the entity this event targets- Returns:
- an
ActivitiEntityEvent
-
createEntityExceptionEvent
public static ActivitiEntityEvent createEntityExceptionEvent(ActivitiEventType type, Object entity, Throwable cause) - Parameters:
type- type of evententity- the entity this event targetscause- the cause of the event- Returns:
- an
ActivitiEntityEventthat is also instance ofActivitiExceptionEvent. In case anExecutionContextis active, the execution related event fields will be populated.
-
createEntityExceptionEvent
public static ActivitiEntityEvent createEntityExceptionEvent(ActivitiEventType type, Object entity, Throwable cause, String executionId, String processInstanceId, String processDefinitionId) - Parameters:
type- type of evententity- the entity this event targetscause- the cause of the event- Returns:
- an
ActivitiEntityEventthat is also instance ofActivitiExceptionEvent.
-
createActivityEvent
public static ActivitiActivityEvent createActivityEvent(ActivitiEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, org.activiti.bpmn.model.FlowElement flowElement) -
createActivityEvent
public static ActivitiActivityEvent createActivityEvent(ActivitiEventType type, DelegateExecution execution, org.activiti.bpmn.model.FlowElement flowElement) -
mayBeResolveExpression
-
parseActivityType
-
parseActivityBehavior
-
createActivityCancelledEvent
-
createActivityCancelledEvent
public static ActivitiActivityCancelledEvent createActivityCancelledEvent(ExecutionEntity execution, Object cause) -
createProcessCancelledEvent
public static ActivitiProcessCancelledEvent createProcessCancelledEvent(ProcessInstance processInstance, Object cause) -
createActivitiySignalledEvent
public static ActivitiSignalEvent createActivitiySignalledEvent(DelegateExecution execution, String signalName, Object payload) -
createMessageReceivedEvent
public static ActivitiMessageEvent createMessageReceivedEvent(DelegateExecution execution, String messageName, String correlationKey, Object payload) -
createMessageWaitingEvent
public static ActivitiMessageEvent createMessageWaitingEvent(DelegateExecution execution, String messageName, String correlationKey) -
createMessageSentEvent
public static ActivitiMessageEvent createMessageSentEvent(DelegateExecution execution, String messageName, String correlationKey, Object payload) -
createErrorEvent
public static ActivitiErrorEvent createErrorEvent(ActivitiEventType type, String activityId, String errorId, String errorCode, String executionId, String processInstanceId, String processDefinitionId) -
createVariableEvent
public static ActivitiVariableEvent createVariableEvent(ActivitiEventType type, String variableName, Object variableValue, VariableType variableType, String taskId, String executionId, String processInstanceId, String processDefinitionId) -
createVariableUpdateEvent
public static ActivitiVariableUpdatedEventImpl createVariableUpdateEvent(VariableInstanceEntity variableInstance, Object previousValue, String processInstanceId, String processDefinitionId) -
createMembershipEvent
public static ActivitiMembershipEvent createMembershipEvent(ActivitiEventType type, String groupId, String userId) -
populateEventWithCurrentContextAndActor
protected static void populateEventWithCurrentContextAndActor(ActivitiEventImpl event, String actor) -
populateEventWithCurrentContext
-
createEntityEventWithActor
public static ActivitiEvent createEntityEventWithActor(ActivitiEventType type, ExecutionEntity entity, String actor)
-