Class FlowableEventBuilder
java.lang.Object
org.flowable.engine.delegate.event.impl.FlowableEventBuilder
Builder class used to create
FlowableEvent
implementations.- Author:
- Frederik Heremans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateActivityCancelledEvent
(String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, String activityType, Object cause) static FlowableActivityEvent
createActivityEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, org.flowable.bpmn.model.FlowElement flowElement) static FlowableCancelledEvent
createCancelledEvent
(String executionId, String processInstanceId, String processDefinitionId, Object cause) static FlowableConditionalEvent
createConditionalEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String activityId, String conditionExpression, String conditionLanguage, String executionId, String processInstanceId, String processDefinitionId) static org.flowable.common.engine.api.delegate.event.FlowableEntityEvent
createEntityEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, Object entity) static org.flowable.common.engine.api.delegate.event.FlowableEntityEvent
createEntityEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, Object entity, String executionId, String processInstanceId, String processDefinitionId) static org.flowable.common.engine.api.delegate.event.FlowableEntityEvent
createEntityExceptionEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, Object entity, Throwable cause) static org.flowable.common.engine.api.delegate.event.FlowableEntityEvent
createEntityExceptionEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, Object entity, Throwable cause, String executionId, String processInstanceId, String processDefinitionId) createEntityWithVariablesEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, Object entity, Map variables, boolean localScope) static FlowableErrorEvent
createErrorEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String activityId, String errorId, String errorCode, String executionId, String processInstanceId, String processDefinitionId) static FlowableEscalationEvent
createEscalationEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String activityId, String escalationCode, String escalationName, String executionId, String processInstanceId, String processDefinitionId) static org.flowable.common.engine.api.delegate.event.FlowableEvent
createEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String executionId, String processInstanceId, String processDefinitionId) static org.flowable.common.engine.api.delegate.event.FlowableEvent
createGlobalEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type) static FlowableJobRescheduledEvent
createJobRescheduledEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, org.flowable.job.api.Job newJob, String originalJobId) static FlowableMessageEvent
createMessageEvent
(org.flowable.common.engine.api.delegate.event.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
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, int numberOfInstances, int numberOfActiveInstances, int numberOfCompletedInstances, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, org.flowable.bpmn.model.FlowElement flowElement) createMultiInstanceActivityEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, org.flowable.bpmn.model.FlowElement flowElement) static FlowableProcessStartedEvent
createProcessStartedEvent
(Object entity, Map variables, boolean localScope) createSequenceFlowTakenEvent
(org.flowable.engine.impl.persistence.entity.ExecutionEntity executionEntity, org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String sequenceFlowId, String sourceActivityId, String sourceActivityName, String sourceActivityType, Object sourceActivityBehavior, String targetActivityId, String targetActivityName, String targetActivityType, Object targetActivityBehavior) static FlowableSignalEvent
createSignalEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String activityId, String signalName, Object signalData, String executionId, String processInstanceId, String processDefinitionId) createTerminateEvent
(org.flowable.engine.impl.persistence.entity.ExecutionEntity execution, Object cause) static org.flowable.variable.api.event.FlowableVariableEvent
createVariableEvent
(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String variableName, Object variableValue, org.flowable.variable.api.types.VariableType variableType, String taskId, String executionId, String processInstanceId, String processDefinitionId, String variableInstanceId) protected static String
parseActivityType
(org.flowable.bpmn.model.FlowNode flowNode) protected static void
populateEventWithCurrentContext
(org.flowable.common.engine.impl.event.FlowableEngineEventImpl event)
-
Constructor Details
-
FlowableEventBuilder
public FlowableEventBuilder()
-
-
Method Details
-
createGlobalEvent
public static org.flowable.common.engine.api.delegate.event.FlowableEvent createGlobalEvent(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type) - Parameters:
type
- type of event- Returns:
- an
FlowableEvent
that doesn't have it's execution context-fields filled, as the event is a global event, independent of any running execution.
-
createEvent
-
createEntityEvent
public static org.flowable.common.engine.api.delegate.event.FlowableEntityEvent createEntityEvent(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, Object entity) - Parameters:
type
- type of evententity
- the entity this event targets- Returns:
- an
FlowableEntityEvent
. In case anExecutionContext
is active, the execution related event fields will be populated. If not, execution details will be retrieved from theObject
if 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 anExecutionContext
is active, the execution related event fields will be populated. If not, execution details will be retrieved from theObject
if possible.
-
createEntityWithVariablesEvent
public static FlowableEntityWithVariablesEvent createEntityWithVariablesEvent(org.flowable.common.engine.api.delegate.event.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 anExecutionContext
is active, the execution related event fields will be populated. If not, execution details will be retrieved from theObject
if possible.
-
createJobRescheduledEvent
public static FlowableJobRescheduledEvent createJobRescheduledEvent(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, org.flowable.job.api.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 anExecutionContext
is active, the execution related event fields will be populated. If not, execution details will be retrieved from theObject
if possible.
-
createSequenceFlowTakenEvent
public static FlowableSequenceFlowTakenEvent createSequenceFlowTakenEvent(org.flowable.engine.impl.persistence.entity.ExecutionEntity executionEntity, org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String sequenceFlowId, String sourceActivityId, String sourceActivityName, String sourceActivityType, Object sourceActivityBehavior, String targetActivityId, String targetActivityName, String targetActivityType, Object targetActivityBehavior) -
createEntityEvent
public static org.flowable.common.engine.api.delegate.event.FlowableEntityEvent createEntityEvent(org.flowable.common.engine.api.delegate.event.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 org.flowable.common.engine.api.delegate.event.FlowableEntityEvent createEntityExceptionEvent(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, Object entity, Throwable cause) - Parameters:
type
- type of evententity
- the entity this event targetscause
- the cause of the event- Returns:
- an
FlowableEntityEvent
that is also instance ofFlowableExceptionEvent
. In case anExecutionContext
is active, the execution related event fields will be populated.
-
createEntityExceptionEvent
public static org.flowable.common.engine.api.delegate.event.FlowableEntityEvent createEntityExceptionEvent(org.flowable.common.engine.api.delegate.event.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
FlowableEntityEvent
that is also instance ofFlowableExceptionEvent
.
-
createActivityEvent
-
createMultiInstanceActivityEvent
public static FlowableMultiInstanceActivityEvent createMultiInstanceActivityEvent(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, org.flowable.bpmn.model.FlowElement flowElement) -
createMultiInstanceActivityCompletedEvent
public static FlowableMultiInstanceActivityCompletedEvent createMultiInstanceActivityCompletedEvent(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, int numberOfInstances, int numberOfActiveInstances, int numberOfCompletedInstances, String activityId, String activityName, String executionId, String processInstanceId, String processDefinitionId, org.flowable.bpmn.model.FlowElement flowElement) -
parseActivityType
-
createActivityCancelledEvent
-
createMultiInstanceActivityCancelledEvent
-
createCancelledEvent
public static FlowableCancelledEvent createCancelledEvent(String executionId, String processInstanceId, String processDefinitionId, Object cause) -
createTerminateEvent
public static FlowableProcessTerminatedEvent createTerminateEvent(org.flowable.engine.impl.persistence.entity.ExecutionEntity execution, Object cause) -
createSignalEvent
-
createMessageEvent
-
createConditionalEvent
-
createEscalationEvent
-
createErrorEvent
-
createVariableEvent
public static org.flowable.variable.api.event.FlowableVariableEvent createVariableEvent(org.flowable.common.engine.api.delegate.event.FlowableEngineEventType type, String variableName, Object variableValue, org.flowable.variable.api.types.VariableType variableType, String taskId, String executionId, String processInstanceId, String processDefinitionId, String variableInstanceId) -
populateEventWithCurrentContext
protected static void populateEventWithCurrentContext(org.flowable.common.engine.impl.event.FlowableEngineEventImpl event)
-