Class DefaultHistoryEventProducer
java.lang.Object
org.cibseven.bpm.engine.impl.history.producer.DefaultHistoryEventProducer
- All Implemented Interfaces:
HistoryEventProducer
- Direct Known Subclasses:
CacheAwareHistoryEventProducer
- Author:
- Daniel Meyer, Ingo Richtsmeier
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddRemovalTimeToHistoricDecisions(String rootProcessInstanceId, Date removalTime) protected voidaddRemovalTimeToHistoricIncidents(HistoricBatchEntity historicBatch) protected voidaddRemovalTimeToHistoricJobLog(HistoricBatchEntity historicBatch) protected voidaddRemovalTimeToHistoricProcessInstances(String rootProcessInstanceId, Date removalTime) protected DatecalculateRemovalTime(HistoricBatchEntity historicBatch) protected DatecalculateRemovalTime(HistoryEvent historyEvent) createActivityInstanceEndEvt(DelegateExecution execution) Creates the history event fired when an activity instance is ended.Creates the history event which is fired when an activity instance is migrated.createActivityInstanceStartEvt(DelegateExecution execution) Creates the history event fired when an activity instance is started.createActivityInstanceUpdateEvt(DelegateExecution execution) Creates the history event fired when an activity instance is updated.createActivityInstanceUpdateEvt(DelegateExecution execution, DelegateTask task) Creates the history event fired when an activity instance is updated.createBatchEndEvent(Batch batch) Creates the history event fired when the a batch has been completed.protected HistoryEventcreateBatchEvent(BatchEntity batch, HistoryEventTypes eventType) createBatchStartEvent(Batch batch) Creates the history event fired when the a batch has been started.createBatchUpdateEvent(Batch batch) Creates the history event fired when a batch has been updated.createFormPropertyUpdateEvt(ExecutionEntity execution, String propertyId, String propertyValue, String taskId) Creates the history event fired when a form property is updated.Creates the history event when an external task has been created.Creates the history event when an external task has been deleted.Creates the history event when the execution of an external task has failed.Creates the history event when the execution of an external task was successful.createHistoricIdentityLinkAddEvent(IdentityLink identityLink) Fired when an identity link is addedcreateHistoricIdentityLinkDeleteEvent(IdentityLink identityLink) Fired when an identity links is deletedprotected HistoryEventcreateHistoricIdentityLinkEvt(IdentityLink identityLink, HistoryEventTypes eventType) createHistoricIncidentCreateEvt(Incident incident) createHistoricIncidentDeleteEvt(Incident incident) protected HistoryEventcreateHistoricIncidentEvt(Incident incident, HistoryEventTypes eventType) createHistoricIncidentMigrateEvt(Incident incident) createHistoricIncidentResolveEvt(Incident incident) createHistoricIncidentUpdateEvt(Incident incident) Creates the history event fired when a job has been created.Creates the history event fired when the a job has been deleted.protected HistoryEventcreateHistoricJobLogEvt(Job job, HistoryEventType eventType) createHistoricJobLogFailedEvt(Job job, Throwable exception) Creates the history event fired when the execution of a job failed.Creates the history event fired when the execution of a job was successful.createHistoricVariableCreateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Creates the history event fired when a variable is created.createHistoricVariableDeleteEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Creates the history event fired when a variable is deleted.protected HistoryEventcreateHistoricVariableEvent(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope, HistoryEventType eventType) createHistoricVariableMigrateEvt(VariableInstanceEntity variableInstance) Creates the history event fired when a variable is migrated.createHistoricVariableUpdateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Creates the history event fired when a variable is updated.createProcessInstanceEndEvt(DelegateExecution execution) Creates the history event fired when a process instance is ended.createProcessInstanceMigrateEvt(DelegateExecution execution) Creates the history event fired when a process instance is migrated.createProcessInstanceStartEvt(DelegateExecution execution) Creates the history event fired when a process instances is created.createProcessInstanceUpdateEvt(DelegateExecution execution) Creates the history event fired when a process instance is updated.createTaskInstanceCompleteEvt(DelegateTask task, String deleteReason) Creates the history event fired when a task instances is completed.Creates the history event fired when a task instance is created.Creates the history event fired when a task instance is migrated.Creates the history event fired when a task instance is updated.Creates the history event fired whenever an operation has been performed by a user.protected voiddetermineEndState(ExecutionEntity executionEntity, HistoricProcessInstanceEventEntity evt) protected ProcessDefinitionfindProcessDefinitionById(String processDefinitionId) protected HistoricBatchEntitygetHistoricBatchById(String batchId) protected HistoricBatchEntitygetHistoricBatchByJobId(String jobId) protected HistoricProcessInstanceEventEntitygetHistoricRootProcessInstance(String rootProcessInstanceId) protected Stringprotected DategetTimestamp(ExternalTaskEntity entity, ExternalTaskState state) protected voidinitActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, MigratingActivityInstance migratingActivityInstance, HistoryEventType eventType) protected voidinitActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) protected voidinitActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, PvmScope eventSource, String activityInstanceId, String parentActivityInstanceId, HistoryEventType eventType) protected HistoricExternalTaskLogEntityinitHistoricExternalTaskLog(ExternalTaskEntity entity, ExternalTaskState state) protected voidinitHistoricIdentityLinkEvent(HistoricIdentityLinkLogEventEntity evt, IdentityLink identityLink, HistoryEventType eventType) protected voidinitHistoricIncidentEvent(HistoricIncidentEventEntity evt, Incident incident, HistoryEventType eventType) protected voidinitHistoricJobLogEvent(HistoricJobLogEventEntity evt, Job job, HistoryEventType eventType) protected voidinitHistoricVariableUpdateEvt(HistoricVariableUpdateEventEntity evt, VariableInstanceEntity variableInstance, HistoryEventType eventType) protected voidinitProcessInstanceEvent(HistoricProcessInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) protected voidinitSequenceCounter(long sequenceCounter, HistoryEvent event) protected voidinitSequenceCounter(ExecutionEntity execution, HistoryEvent event) protected voidinitSequenceCounter(JobEntity job, HistoryEvent event) protected voidinitSequenceCounter(VariableInstanceEntity variable, HistoryEvent event) protected voidinitTaskInstanceEvent(HistoricTaskInstanceEventEntity evt, TaskEntity taskEntity, HistoryEventType eventType) protected voidinitUserOperationLogEvent(UserOperationLogEntryEventEntity evt, UserOperationLogContext context, UserOperationLogContextEntry contextEntry, PropertyChange propertyChange) protected booleanprotected booleanprotected booleanprotected booleanprotected HistoricActivityInstanceEventEntityloadActivityInstanceEventEntity(ExecutionEntity execution) protected HistoricBatchEntityloadBatchEntity(BatchEntity batch) protected HistoricIncidentEventEntityloadIncidentEvent(Incident incident) protected HistoricProcessInstanceEventEntityloadProcessInstanceEventEntity(ExecutionEntity execution) protected HistoricTaskInstanceEventEntityprotected HistoricActivityInstanceEventEntitynewActivityInstanceEventEntity(ExecutionEntity execution) protected HistoricBatchEntitynewBatchEventEntity(BatchEntity batch) protected HistoricFormPropertyEventEntityprotected HistoricJobLogEventEntityprotected HistoricIdentityLinkLogEventEntityprotected HistoricIncidentEventEntitynewIncidentEventEntity(Incident incident) protected HistoricProcessInstanceEventEntitynewProcessInstanceEventEntity(ExecutionEntity execution) protected HistoricTaskInstanceEventEntityprotected HistoricVariableUpdateEventEntitynewVariableUpdateEventEntity(ExecutionEntity execution) protected voidprovideRemovalTime(HistoricBatchEntity historicBatch) protected voidprovideRemovalTime(HistoryEvent historyEvent)
-
Field Details
-
LOG
-
-
Constructor Details
-
DefaultHistoryEventProducer
public DefaultHistoryEventProducer()
-
-
Method Details
-
initActivityInstanceEvent
protected void initActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) -
initActivityInstanceEvent
protected void initActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, MigratingActivityInstance migratingActivityInstance, HistoryEventType eventType) -
initActivityInstanceEvent
protected void initActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, PvmScope eventSource, String activityInstanceId, String parentActivityInstanceId, HistoryEventType eventType) -
initProcessInstanceEvent
protected void initProcessInstanceEvent(HistoricProcessInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) -
initTaskInstanceEvent
protected void initTaskInstanceEvent(HistoricTaskInstanceEventEntity evt, TaskEntity taskEntity, HistoryEventType eventType) -
initHistoricVariableUpdateEvt
protected void initHistoricVariableUpdateEvt(HistoricVariableUpdateEventEntity evt, VariableInstanceEntity variableInstance, HistoryEventType eventType) -
initUserOperationLogEvent
protected void initUserOperationLogEvent(UserOperationLogEntryEventEntity evt, UserOperationLogContext context, UserOperationLogContextEntry contextEntry, PropertyChange propertyChange) -
initHistoricIncidentEvent
protected void initHistoricIncidentEvent(HistoricIncidentEventEntity evt, Incident incident, HistoryEventType eventType) -
createHistoricVariableEvent
protected HistoryEvent createHistoricVariableEvent(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope, HistoryEventType eventType) -
newProcessInstanceEventEntity
protected HistoricProcessInstanceEventEntity newProcessInstanceEventEntity(ExecutionEntity execution) -
newActivityInstanceEventEntity
protected HistoricActivityInstanceEventEntity newActivityInstanceEventEntity(ExecutionEntity execution) -
newTaskInstanceEventEntity
-
newVariableUpdateEventEntity
-
newHistoricFormPropertyEvent
-
newIncidentEventEntity
-
newHistoricJobLogEntity
-
newBatchEventEntity
-
loadProcessInstanceEventEntity
protected HistoricProcessInstanceEventEntity loadProcessInstanceEventEntity(ExecutionEntity execution) -
loadActivityInstanceEventEntity
protected HistoricActivityInstanceEventEntity loadActivityInstanceEventEntity(ExecutionEntity execution) -
loadTaskInstanceEvent
-
loadIncidentEvent
-
loadBatchEntity
-
createProcessInstanceStartEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a process instances is created.- Specified by:
createProcessInstanceStartEvtin interfaceHistoryEventProducer- Parameters:
execution- the current execution.- Returns:
- the history event
-
createProcessInstanceUpdateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a process instance is updated.- Specified by:
createProcessInstanceUpdateEvtin interfaceHistoryEventProducer- Parameters:
execution- the process instance- Returns:
- the created history event
-
createProcessInstanceMigrateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a process instance is migrated.- Specified by:
createProcessInstanceMigrateEvtin interfaceHistoryEventProducer- Parameters:
execution- the process instance- Returns:
- the created history event
-
createProcessInstanceEndEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a process instance is ended.- Specified by:
createProcessInstanceEndEvtin interfaceHistoryEventProducer- Parameters:
execution- the current execution.- Returns:
- the history event
-
addRemovalTimeToHistoricDecisions
-
addRemovalTimeToHistoricProcessInstances
-
isDmnEnabled
protected boolean isDmnEnabled() -
determineEndState
protected void determineEndState(ExecutionEntity executionEntity, HistoricProcessInstanceEventEntity evt) -
createActivityInstanceStartEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when an activity instance is started.- Specified by:
createActivityInstanceStartEvtin interfaceHistoryEventProducer- Parameters:
execution- the current execution.- Returns:
- the history event
-
createActivityInstanceUpdateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when an activity instance is updated.- Specified by:
createActivityInstanceUpdateEvtin interfaceHistoryEventProducer- Parameters:
execution- the current execution.- Returns:
- the history event
-
createActivityInstanceUpdateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when an activity instance is updated.- Specified by:
createActivityInstanceUpdateEvtin interfaceHistoryEventProducer- Parameters:
execution- the current execution.task- the task association that is currently updated. (May be null in case there is not task associated.)- Returns:
- the history event
-
createActivityInstanceMigrateEvt
Description copied from interface:HistoryEventProducerCreates the history event which is fired when an activity instance is migrated.- Specified by:
createActivityInstanceMigrateEvtin interfaceHistoryEventProducer- Parameters:
actInstance- the migrated activity instance which contains the new id's- Returns:
- the created history event
-
createActivityInstanceEndEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when an activity instance is ended.- Specified by:
createActivityInstanceEndEvtin interfaceHistoryEventProducer- Parameters:
execution- the current execution.- Returns:
- the history event
-
createTaskInstanceCreateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a task instance is created.- Specified by:
createTaskInstanceCreateEvtin interfaceHistoryEventProducer- Parameters:
task- the task- Returns:
- the history event
-
createTaskInstanceUpdateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a task instance is updated.- Specified by:
createTaskInstanceUpdateEvtin interfaceHistoryEventProducer- Parameters:
task- the task- Returns:
- the history event
-
createTaskInstanceMigrateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a task instance is migrated.- Specified by:
createTaskInstanceMigrateEvtin interfaceHistoryEventProducer- Parameters:
task- the task- Returns:
- the history event
-
createTaskInstanceCompleteEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a task instances is completed.- Specified by:
createTaskInstanceCompleteEvtin interfaceHistoryEventProducer- Parameters:
task- the task- Returns:
- the history event
-
createUserOperationLogEvents
Description copied from interface:HistoryEventProducerCreates the history event fired whenever an operation has been performed by a user. This is used for logging actions such as creating a new Task, completing a task, canceling a a process instance, ...- Specified by:
createUserOperationLogEventsin interfaceHistoryEventProducer- Parameters:
context- theUserOperationLogContextproviding the needed informations- Returns:
- a
ListofHistoryEvents
-
createHistoricVariableCreateEvt
public HistoryEvent createHistoricVariableCreateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Description copied from interface:HistoryEventProducerCreates the history event fired when a variable is created.- Specified by:
createHistoricVariableCreateEvtin interfaceHistoryEventProducer- Parameters:
variableInstance- the runtime variable instance- Returns:
- the history event
-
createHistoricVariableDeleteEvt
public HistoryEvent createHistoricVariableDeleteEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Description copied from interface:HistoryEventProducerCreates the history event fired when a variable is deleted.- Specified by:
createHistoricVariableDeleteEvtin interfaceHistoryEventProducer- Returns:
- the history event
-
createHistoricVariableUpdateEvt
public HistoryEvent createHistoricVariableUpdateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Description copied from interface:HistoryEventProducerCreates the history event fired when a variable is updated.- Specified by:
createHistoricVariableUpdateEvtin interfaceHistoryEventProducer- Parameters:
variableInstance- the runtime variable instance- Returns:
- the history event
-
createHistoricVariableMigrateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a variable is migrated.- Specified by:
createHistoricVariableMigrateEvtin interfaceHistoryEventProducer- Parameters:
variableInstance- the runtime variable instance- Returns:
- the history event
-
createFormPropertyUpdateEvt
public HistoryEvent createFormPropertyUpdateEvt(ExecutionEntity execution, String propertyId, String propertyValue, String taskId) Description copied from interface:HistoryEventProducerCreates the history event fired when a form property is updated.- Specified by:
createFormPropertyUpdateEvtin interfaceHistoryEventProducerpropertyId- the id of the form propertypropertyValue- the value of the form property- Returns:
- the history event
-
createHistoricIncidentCreateEvt
- Specified by:
createHistoricIncidentCreateEvtin interfaceHistoryEventProducer
-
createHistoricIncidentUpdateEvt
- Specified by:
createHistoricIncidentUpdateEvtin interfaceHistoryEventProducer
-
createHistoricIncidentResolveEvt
- Specified by:
createHistoricIncidentResolveEvtin interfaceHistoryEventProducer
-
createHistoricIncidentDeleteEvt
- Specified by:
createHistoricIncidentDeleteEvtin interfaceHistoryEventProducer
-
createHistoricIncidentMigrateEvt
- Specified by:
createHistoricIncidentMigrateEvtin interfaceHistoryEventProducer
-
createHistoricIncidentEvt
-
createHistoricIdentityLinkAddEvent
Description copied from interface:HistoryEventProducerFired when an identity link is added- Specified by:
createHistoricIdentityLinkAddEventin interfaceHistoryEventProducer- Returns:
-
createHistoricIdentityLinkDeleteEvent
Description copied from interface:HistoryEventProducerFired when an identity links is deleted- Specified by:
createHistoricIdentityLinkDeleteEventin interfaceHistoryEventProducer- Returns:
-
createHistoricIdentityLinkEvt
protected HistoryEvent createHistoricIdentityLinkEvt(IdentityLink identityLink, HistoryEventTypes eventType) -
newIdentityLinkEventEntity
-
initHistoricIdentityLinkEvent
protected void initHistoricIdentityLinkEvent(HistoricIdentityLinkLogEventEntity evt, IdentityLink identityLink, HistoryEventType eventType) -
createBatchStartEvent
Description copied from interface:HistoryEventProducerCreates the history event fired when the a batch has been started.- Specified by:
createBatchStartEventin interfaceHistoryEventProducer
-
createBatchEndEvent
Description copied from interface:HistoryEventProducerCreates the history event fired when the a batch has been completed.- Specified by:
createBatchEndEventin interfaceHistoryEventProducer
-
createBatchUpdateEvent
Description copied from interface:HistoryEventProducerCreates the history event fired when a batch has been updated.- Specified by:
createBatchUpdateEventin interfaceHistoryEventProducer
-
createBatchEvent
-
createHistoricJobLogCreateEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when a job has been created.- Specified by:
createHistoricJobLogCreateEvtin interfaceHistoryEventProducer
-
createHistoricJobLogFailedEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when the execution of a job failed.- Specified by:
createHistoricJobLogFailedEvtin interfaceHistoryEventProducer
-
createHistoricJobLogSuccessfulEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when the execution of a job was successful.- Specified by:
createHistoricJobLogSuccessfulEvtin interfaceHistoryEventProducer
-
createHistoricJobLogDeleteEvt
Description copied from interface:HistoryEventProducerCreates the history event fired when the a job has been deleted.- Specified by:
createHistoricJobLogDeleteEvtin interfaceHistoryEventProducer
-
createHistoricJobLogEvt
-
initHistoricJobLogEvent
protected void initHistoricJobLogEvent(HistoricJobLogEventEntity evt, Job job, HistoryEventType eventType) -
createHistoricExternalTaskLogCreatedEvt
Description copied from interface:HistoryEventProducerCreates the history event when an external task has been created.- Specified by:
createHistoricExternalTaskLogCreatedEvtin interfaceHistoryEventProducer
-
createHistoricExternalTaskLogFailedEvt
Description copied from interface:HistoryEventProducerCreates the history event when the execution of an external task has failed.- Specified by:
createHistoricExternalTaskLogFailedEvtin interfaceHistoryEventProducer
-
createHistoricExternalTaskLogSuccessfulEvt
Description copied from interface:HistoryEventProducerCreates the history event when the execution of an external task was successful.- Specified by:
createHistoricExternalTaskLogSuccessfulEvtin interfaceHistoryEventProducer
-
createHistoricExternalTaskLogDeletedEvt
Description copied from interface:HistoryEventProducerCreates the history event when an external task has been deleted.- Specified by:
createHistoricExternalTaskLogDeletedEvtin interfaceHistoryEventProducer
-
initHistoricExternalTaskLog
protected HistoricExternalTaskLogEntity initHistoricExternalTaskLog(ExternalTaskEntity entity, ExternalTaskState state) -
getTimestamp
-
isRootProcessInstance
-
isHistoryRemovalTimeStrategyStart
protected boolean isHistoryRemovalTimeStrategyStart() -
isHistoryRemovalTimeStrategyEnd
protected boolean isHistoryRemovalTimeStrategyEnd() -
getHistoryRemovalTimeStrategy
-
calculateRemovalTime
-
calculateRemovalTime
-
provideRemovalTime
-
provideRemovalTime
-
getHistoricRootProcessInstance
protected HistoricProcessInstanceEventEntity getHistoricRootProcessInstance(String rootProcessInstanceId) -
findProcessDefinitionById
-
getHistoricBatchById
-
getHistoricBatchByJobId
-
addRemovalTimeToHistoricJobLog
-
addRemovalTimeToHistoricIncidents
-
initSequenceCounter
-
initSequenceCounter
-
initSequenceCounter
-
initSequenceCounter
-