Class FlowableEventBuilder
java.lang.Object
org.flowable.engine.delegate.event.impl.FlowableEventBuilder
Builder class used to create
FlowableEvent implementations.- Author:
- Frederik Heremans
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateActivityCancelledEvent(String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, String activityType, Object cause) static FlowableActivityEventcreateActivityEvent(FlowableEngineEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, FlowElement flowElement) static FlowableCancelledEventcreateCancelledEvent(String executionId, String processInstanceId, String processDefinitionId, Object cause) static FlowableConditionalEventcreateConditionalEvent(FlowableEngineEventType type, String activityId, String conditionExpression, String executionId, String processInstanceId, String processDefinitionId) static FlowableEntityEventcreateEntityEvent(FlowableEngineEventType type, Object entity) static FlowableEntityEventcreateEntityEvent(FlowableEngineEventType type, Object entity, String executionId, String processInstanceId, String processDefinitionId) static FlowableEntityEventcreateEntityExceptionEvent(FlowableEngineEventType type, Object entity, Throwable cause) static FlowableEntityEventcreateEntityExceptionEvent(FlowableEngineEventType type, Object entity, Throwable cause, String executionId, String processInstanceId, String processDefinitionId) createEntityWithVariablesEvent(FlowableEngineEventType type, Object entity, Map variables, boolean localScope) static FlowableErrorEventcreateErrorEvent(FlowableEngineEventType type, String activityId, String errorId, String errorCode, String executionId, String processInstanceId, String processDefinitionId) static FlowableEscalationEventcreateEscalationEvent(FlowableEngineEventType type, String activityId, String escalationCode, String escalationName, String executionId, String processInstanceId, String processDefinitionId) static FlowableEventcreateEvent(FlowableEngineEventType type, String executionId, String processInstanceId, String processDefinitionId) static FlowableEventstatic FlowableJobRescheduledEventcreateJobRescheduledEvent(FlowableEngineEventType type, Job newJob, String originalJobId) static FlowableMessageEventcreateMessageEvent(FlowableEngineEventType type, String activityId, String messageName, Object payload, String executionId, String processInstanceId, String processDefinitionId) createMultiInstanceActivityCancelledEvent(String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, String activityType, Object cause) createMultiInstanceActivityCompletedEvent(FlowableEngineEventType type, int numberOfInstances, int numberOfActiveInstances, int numberOfCompletedInstances, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, FlowElement flowElement) createMultiInstanceActivityEvent(FlowableEngineEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, FlowElement flowElement) static FlowableProcessStartedEventcreateProcessStartedEvent(Object entity, Map variables, boolean localScope) createSequenceFlowTakenEvent(ExecutionEntity executionEntity, FlowableEngineEventType type, String sequenceFlowId, String sourceActivityId, String sourceActivityName, String sourceActivityType, Object sourceActivityBehavior, String targetActivityId, String targetActivityName, String targetActivityType, Object targetActivityBehavior) static FlowableSignalEventcreateSignalEvent(FlowableEngineEventType type, String activityId, String signalName, Object signalData, String executionId, String processInstanceId, String processDefinitionId) createTerminateEvent(ExecutionEntity execution, Object cause) static FlowableVariableEventcreateVariableEvent(FlowableEngineEventType type, String variableName, Object variableValue, VariableType variableType, String taskId, String executionId, String processInstanceId, String processDefinitionId, String variableInstanceId) protected static StringparseActivityType(FlowNode flowNode) protected static void
-
Constructor Details
-
FlowableEventBuilder
public FlowableEventBuilder()
-
-
Method Details
-
createGlobalEvent
- Parameters:
type- type of event- Returns:
- an
FlowableEventthat doesn't have it's execution context-fields filled, as the event is a global event, independent of any running execution.
-
createEvent
public static FlowableEvent createEvent(FlowableEngineEventType type, String executionId, String processInstanceId, String processDefinitionId) -
createEntityEvent
- Parameters:
type- type of evententity- the entity this event targets- Returns:
- an
FlowableEntityEvent. 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 FlowableProcessStartedEvent createProcessStartedEvent(Object entity, Map variables, boolean localScope) - Parameters:
entity- the entity this event targetsvariables- the variables associated with this entity- Returns:
- an
FlowableEntityEvent. 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 FlowableEntityWithVariablesEvent createEntityWithVariablesEvent(FlowableEngineEventType 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
FlowableEntityEvent. In case anExecutionContextis active, the execution related event fields will be populated. If not, execution details will be retrieved from theObjectif possible.
-
createJobRescheduledEvent
public static FlowableJobRescheduledEvent createJobRescheduledEvent(FlowableEngineEventType type, Job newJob, String originalJobId) - Parameters:
type- type of eventnewJob- the new job that was created due to the rescheduleoriginalJobId- the job id of the original job that was rescheduled- Returns:
- an
FlowableEntityEvent. 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 FlowableSequenceFlowTakenEvent createSequenceFlowTakenEvent(ExecutionEntity executionEntity, FlowableEngineEventType type, String sequenceFlowId, String sourceActivityId, String sourceActivityName, String sourceActivityType, Object sourceActivityBehavior, String targetActivityId, String targetActivityName, String targetActivityType, Object targetActivityBehavior) -
createEntityEvent
public static FlowableEntityEvent createEntityEvent(FlowableEngineEventType type, Object entity, String executionId, String processInstanceId, String processDefinitionId) - Parameters:
type- type of evententity- the entity this event targets- Returns:
- an
FlowableEntityEvent
-
createEntityExceptionEvent
public static FlowableEntityEvent createEntityExceptionEvent(FlowableEngineEventType type, Object entity, Throwable cause) - Parameters:
type- type of evententity- the entity this event targetscause- the cause of the event- Returns:
- an
FlowableEntityEventthat is also instance ofFlowableExceptionEvent. In case anExecutionContextis active, the execution related event fields will be populated.
-
createEntityExceptionEvent
public static FlowableEntityEvent createEntityExceptionEvent(FlowableEngineEventType 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
FlowableEntityEventthat is also instance ofFlowableExceptionEvent.
-
createActivityEvent
public static FlowableActivityEvent createActivityEvent(FlowableEngineEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, FlowElement flowElement) -
createMultiInstanceActivityEvent
public static FlowableMultiInstanceActivityEvent createMultiInstanceActivityEvent(FlowableEngineEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, FlowElement flowElement) -
createMultiInstanceActivityCompletedEvent
public static FlowableMultiInstanceActivityCompletedEvent createMultiInstanceActivityCompletedEvent(FlowableEngineEventType type, int numberOfInstances, int numberOfActiveInstances, int numberOfCompletedInstances, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, FlowElement flowElement) -
parseActivityType
-
createActivityCancelledEvent
-
createMultiInstanceActivityCancelledEvent
-
createCancelledEvent
public static FlowableCancelledEvent createCancelledEvent(String executionId, String processInstanceId, String processDefinitionId, Object cause) -
createTerminateEvent
public static FlowableProcessTerminatedEvent createTerminateEvent(ExecutionEntity execution, Object cause) -
createSignalEvent
public static FlowableSignalEvent createSignalEvent(FlowableEngineEventType type, String activityId, String signalName, Object signalData, String executionId, String processInstanceId, String processDefinitionId) -
createMessageEvent
public static FlowableMessageEvent createMessageEvent(FlowableEngineEventType type, String activityId, String messageName, Object payload, String executionId, String processInstanceId, String processDefinitionId) -
createConditionalEvent
public static FlowableConditionalEvent createConditionalEvent(FlowableEngineEventType type, String activityId, String conditionExpression, String executionId, String processInstanceId, String processDefinitionId) -
createEscalationEvent
public static FlowableEscalationEvent createEscalationEvent(FlowableEngineEventType type, String activityId, String escalationCode, String escalationName, String executionId, String processInstanceId, String processDefinitionId) -
createErrorEvent
public static FlowableErrorEvent createErrorEvent(FlowableEngineEventType type, String activityId, String errorId, String errorCode, String executionId, String processInstanceId, String processDefinitionId) -
createVariableEvent
public static FlowableVariableEvent createVariableEvent(FlowableEngineEventType type, String variableName, Object variableValue, VariableType variableType, String taskId, String executionId, String processInstanceId, String processDefinitionId, String variableInstanceId) -
populateEventWithCurrentContext
-