Class DefaultHistoryEventProducer
java.lang.Object
org.camunda.bpm.engine.impl.history.producer.DefaultHistoryEventProducer
- All Implemented Interfaces:
HistoryEventProducer
- Direct Known Subclasses:
CacheAwareHistoryEventProducer
- Author:
- Daniel Meyer, Ingo Richtsmeier
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRemovalTimeToHistoricDecisions
(String rootProcessInstanceId, Date removalTime) protected void
addRemovalTimeToHistoricIncidents
(HistoricBatchEntity historicBatch) protected void
addRemovalTimeToHistoricJobLog
(HistoricBatchEntity historicBatch) protected void
addRemovalTimeToHistoricProcessInstances
(String rootProcessInstanceId, Date removalTime) protected Date
calculateRemovalTime
(HistoricBatchEntity historicBatch) protected Date
calculateRemovalTime
(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 HistoryEvent
createBatchEvent
(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 HistoryEvent
createHistoricIdentityLinkEvt
(IdentityLink identityLink, HistoryEventTypes eventType) createHistoricIncidentCreateEvt
(Incident incident) createHistoricIncidentDeleteEvt
(Incident incident) protected HistoryEvent
createHistoricIncidentEvt
(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 HistoryEvent
createHistoricJobLogEvt
(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 HistoryEvent
createHistoricVariableEvent
(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 void
determineEndState
(ExecutionEntity executionEntity, HistoricProcessInstanceEventEntity evt) protected ProcessDefinition
findProcessDefinitionById
(String processDefinitionId) protected HistoricBatchEntity
getHistoricBatchById
(String batchId) protected HistoricBatchEntity
getHistoricBatchByJobId
(String jobId) protected HistoricProcessInstanceEventEntity
getHistoricRootProcessInstance
(String rootProcessInstanceId) protected String
protected Date
getTimestamp
(ExternalTaskEntity entity, ExternalTaskState state) protected void
initActivityInstanceEvent
(HistoricActivityInstanceEventEntity evt, MigratingActivityInstance migratingActivityInstance, HistoryEventType eventType) protected void
initActivityInstanceEvent
(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) protected void
initActivityInstanceEvent
(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, PvmScope eventSource, String activityInstanceId, String parentActivityInstanceId, HistoryEventType eventType) protected HistoricExternalTaskLogEntity
initHistoricExternalTaskLog
(ExternalTaskEntity entity, ExternalTaskState state) protected void
initHistoricIdentityLinkEvent
(HistoricIdentityLinkLogEventEntity evt, IdentityLink identityLink, HistoryEventType eventType) protected void
initHistoricIncidentEvent
(HistoricIncidentEventEntity evt, Incident incident, HistoryEventType eventType) protected void
initHistoricJobLogEvent
(HistoricJobLogEventEntity evt, Job job, HistoryEventType eventType) protected void
initHistoricVariableUpdateEvt
(HistoricVariableUpdateEventEntity evt, VariableInstanceEntity variableInstance, HistoryEventType eventType) protected void
initProcessInstanceEvent
(HistoricProcessInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) protected void
initSequenceCounter
(long sequenceCounter, HistoryEvent event) protected void
initSequenceCounter
(ExecutionEntity execution, HistoryEvent event) protected void
initSequenceCounter
(JobEntity job, HistoryEvent event) protected void
initSequenceCounter
(VariableInstanceEntity variable, HistoryEvent event) protected void
initTaskInstanceEvent
(HistoricTaskInstanceEventEntity evt, TaskEntity taskEntity, HistoryEventType eventType) protected void
initUserOperationLogEvent
(UserOperationLogEntryEventEntity evt, UserOperationLogContext context, UserOperationLogContextEntry contextEntry, PropertyChange propertyChange) protected boolean
protected boolean
protected boolean
protected boolean
protected HistoricActivityInstanceEventEntity
loadActivityInstanceEventEntity
(ExecutionEntity execution) protected HistoricBatchEntity
loadBatchEntity
(BatchEntity batch) protected HistoricIncidentEventEntity
loadIncidentEvent
(Incident incident) protected HistoricProcessInstanceEventEntity
loadProcessInstanceEventEntity
(ExecutionEntity execution) protected HistoricTaskInstanceEventEntity
protected HistoricActivityInstanceEventEntity
newActivityInstanceEventEntity
(ExecutionEntity execution) protected HistoricBatchEntity
newBatchEventEntity
(BatchEntity batch) protected HistoricFormPropertyEventEntity
protected HistoricJobLogEventEntity
protected HistoricIdentityLinkLogEventEntity
protected HistoricIncidentEventEntity
newIncidentEventEntity
(Incident incident) protected HistoricProcessInstanceEventEntity
newProcessInstanceEventEntity
(ExecutionEntity execution) protected HistoricTaskInstanceEventEntity
protected HistoricVariableUpdateEventEntity
newVariableUpdateEventEntity
(ExecutionEntity execution) protected void
provideRemovalTime
(HistoricBatchEntity historicBatch) protected void
provideRemovalTime
(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:HistoryEventProducer
Creates the history event fired when a process instances is created.- Specified by:
createProcessInstanceStartEvt
in interfaceHistoryEventProducer
- Parameters:
execution
- the current execution.- Returns:
- the history event
-
createProcessInstanceUpdateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a process instance is updated.- Specified by:
createProcessInstanceUpdateEvt
in interfaceHistoryEventProducer
- Parameters:
execution
- the process instance- Returns:
- the created history event
-
createProcessInstanceMigrateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a process instance is migrated.- Specified by:
createProcessInstanceMigrateEvt
in interfaceHistoryEventProducer
- Parameters:
execution
- the process instance- Returns:
- the created history event
-
createProcessInstanceEndEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a process instance is ended.- Specified by:
createProcessInstanceEndEvt
in 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:HistoryEventProducer
Creates the history event fired when an activity instance is started.- Specified by:
createActivityInstanceStartEvt
in interfaceHistoryEventProducer
- Parameters:
execution
- the current execution.- Returns:
- the history event
-
createActivityInstanceUpdateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when an activity instance is updated.- Specified by:
createActivityInstanceUpdateEvt
in interfaceHistoryEventProducer
- Parameters:
execution
- the current execution.- Returns:
- the history event
-
createActivityInstanceUpdateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when an activity instance is updated.- Specified by:
createActivityInstanceUpdateEvt
in 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:HistoryEventProducer
Creates the history event which is fired when an activity instance is migrated.- Specified by:
createActivityInstanceMigrateEvt
in interfaceHistoryEventProducer
- Parameters:
actInstance
- the migrated activity instance which contains the new id's- Returns:
- the created history event
-
createActivityInstanceEndEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when an activity instance is ended.- Specified by:
createActivityInstanceEndEvt
in interfaceHistoryEventProducer
- Parameters:
execution
- the current execution.- Returns:
- the history event
-
createTaskInstanceCreateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a task instance is created.- Specified by:
createTaskInstanceCreateEvt
in interfaceHistoryEventProducer
- Parameters:
task
- the task- Returns:
- the history event
-
createTaskInstanceUpdateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a task instance is updated.- Specified by:
createTaskInstanceUpdateEvt
in interfaceHistoryEventProducer
- Parameters:
task
- the task- Returns:
- the history event
-
createTaskInstanceMigrateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a task instance is migrated.- Specified by:
createTaskInstanceMigrateEvt
in interfaceHistoryEventProducer
- Parameters:
task
- the task- Returns:
- the history event
-
createTaskInstanceCompleteEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a task instances is completed.- Specified by:
createTaskInstanceCompleteEvt
in interfaceHistoryEventProducer
- Parameters:
task
- the task- Returns:
- the history event
-
createUserOperationLogEvents
Description copied from interface:HistoryEventProducer
Creates 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:
createUserOperationLogEvents
in interfaceHistoryEventProducer
- Parameters:
context
- theUserOperationLogContext
providing the needed informations- Returns:
- a
List
ofHistoryEvent
s
-
createHistoricVariableCreateEvt
public HistoryEvent createHistoricVariableCreateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Description copied from interface:HistoryEventProducer
Creates the history event fired when a variable is created.- Specified by:
createHistoricVariableCreateEvt
in interfaceHistoryEventProducer
- Parameters:
variableInstance
- the runtime variable instance- Returns:
- the history event
-
createHistoricVariableDeleteEvt
public HistoryEvent createHistoricVariableDeleteEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Description copied from interface:HistoryEventProducer
Creates the history event fired when a variable is deleted.- Specified by:
createHistoricVariableDeleteEvt
in interfaceHistoryEventProducer
- Returns:
- the history event
-
createHistoricVariableUpdateEvt
public HistoryEvent createHistoricVariableUpdateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope) Description copied from interface:HistoryEventProducer
Creates the history event fired when a variable is updated.- Specified by:
createHistoricVariableUpdateEvt
in interfaceHistoryEventProducer
- Parameters:
variableInstance
- the runtime variable instance- Returns:
- the history event
-
createHistoricVariableMigrateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a variable is migrated.- Specified by:
createHistoricVariableMigrateEvt
in 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:HistoryEventProducer
Creates the history event fired when a form property is updated.- Specified by:
createFormPropertyUpdateEvt
in interfaceHistoryEventProducer
propertyId
- the id of the form propertypropertyValue
- the value of the form property- Returns:
- the history event
-
createHistoricIncidentCreateEvt
- Specified by:
createHistoricIncidentCreateEvt
in interfaceHistoryEventProducer
-
createHistoricIncidentUpdateEvt
- Specified by:
createHistoricIncidentUpdateEvt
in interfaceHistoryEventProducer
-
createHistoricIncidentResolveEvt
- Specified by:
createHistoricIncidentResolveEvt
in interfaceHistoryEventProducer
-
createHistoricIncidentDeleteEvt
- Specified by:
createHistoricIncidentDeleteEvt
in interfaceHistoryEventProducer
-
createHistoricIncidentMigrateEvt
- Specified by:
createHistoricIncidentMigrateEvt
in interfaceHistoryEventProducer
-
createHistoricIncidentEvt
-
createHistoricIdentityLinkAddEvent
Description copied from interface:HistoryEventProducer
Fired when an identity link is added- Specified by:
createHistoricIdentityLinkAddEvent
in interfaceHistoryEventProducer
- Returns:
-
createHistoricIdentityLinkDeleteEvent
Description copied from interface:HistoryEventProducer
Fired when an identity links is deleted- Specified by:
createHistoricIdentityLinkDeleteEvent
in 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:HistoryEventProducer
Creates the history event fired when the a batch has been started.- Specified by:
createBatchStartEvent
in interfaceHistoryEventProducer
-
createBatchEndEvent
Description copied from interface:HistoryEventProducer
Creates the history event fired when the a batch has been completed.- Specified by:
createBatchEndEvent
in interfaceHistoryEventProducer
-
createBatchUpdateEvent
Description copied from interface:HistoryEventProducer
Creates the history event fired when a batch has been updated.- Specified by:
createBatchUpdateEvent
in interfaceHistoryEventProducer
-
createBatchEvent
-
createHistoricJobLogCreateEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when a job has been created.- Specified by:
createHistoricJobLogCreateEvt
in interfaceHistoryEventProducer
-
createHistoricJobLogFailedEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when the execution of a job failed.- Specified by:
createHistoricJobLogFailedEvt
in interfaceHistoryEventProducer
-
createHistoricJobLogSuccessfulEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when the execution of a job was successful.- Specified by:
createHistoricJobLogSuccessfulEvt
in interfaceHistoryEventProducer
-
createHistoricJobLogDeleteEvt
Description copied from interface:HistoryEventProducer
Creates the history event fired when the a job has been deleted.- Specified by:
createHistoricJobLogDeleteEvt
in interfaceHistoryEventProducer
-
createHistoricJobLogEvt
-
initHistoricJobLogEvent
protected void initHistoricJobLogEvent(HistoricJobLogEventEntity evt, Job job, HistoryEventType eventType) -
createHistoricExternalTaskLogCreatedEvt
Description copied from interface:HistoryEventProducer
Creates the history event when an external task has been created.- Specified by:
createHistoricExternalTaskLogCreatedEvt
in interfaceHistoryEventProducer
-
createHistoricExternalTaskLogFailedEvt
Description copied from interface:HistoryEventProducer
Creates the history event when the execution of an external task has failed.- Specified by:
createHistoricExternalTaskLogFailedEvt
in interfaceHistoryEventProducer
-
createHistoricExternalTaskLogSuccessfulEvt
Description copied from interface:HistoryEventProducer
Creates the history event when the execution of an external task was successful.- Specified by:
createHistoricExternalTaskLogSuccessfulEvt
in interfaceHistoryEventProducer
-
createHistoricExternalTaskLogDeletedEvt
Description copied from interface:HistoryEventProducer
Creates the history event when an external task has been deleted.- Specified by:
createHistoricExternalTaskLogDeletedEvt
in 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
-