Package org.activiti.engine.impl.history
Class DefaultHistoryManager
java.lang.Object
org.activiti.engine.impl.persistence.AbstractManager
org.activiti.engine.impl.history.DefaultHistoryManager
- All Implemented Interfaces:
HistoryManager
Manager class that centralises recording of all history-related operations that are originated from inside the engine.
-
Field Summary
Fields inherited from class org.activiti.engine.impl.persistence.AbstractManager
processEngineConfiguration -
Constructor Summary
ConstructorsConstructorDescriptionDefaultHistoryManager(ProcessEngineConfigurationImpl processEngineConfiguration, HistoryLevel historyLevel) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAttachmentComment(String taskId, String processInstanceId, String attachmentName, boolean create) Creates a new comment to indicate a new attachment has been created or deleted, if history is enabled.voidcreateGroupIdentityLinkComment(String taskId, String groupId, String type, boolean create) Creates a new comment to indicate a new groupIdentityLinkhas been created or deleted, if history is enabled.protected HistoricActivityInstanceEntityvoidcreateIdentityLinkComment(String taskId, String userId, String groupId, String type, boolean create) Creates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.voidcreateIdentityLinkComment(String taskId, String userId, String groupId, String type, boolean create, boolean forceNullUserId) Creates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.voidcreateProcessInstanceIdentityLinkComment(String processInstanceId, String userId, String groupId, String type, boolean create) Creates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.voidcreateProcessInstanceIdentityLinkComment(String processInstanceId, String userId, String groupId, String type, boolean create, boolean forceNullUserId) Creates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.voidcreateUserIdentityLinkComment(String taskId, String userId, String type, boolean create) Creates a new comment to indicate a new userIdentityLinkhas been created or deleted, if history is enabled.voidcreateUserIdentityLinkComment(String taskId, String userId, String type, boolean create, boolean forceNullUserId) Creates a new comment to indicate a new userIdentityLinkhas been created or deleted, if history is enabled.voidfindActivityInstance(ExecutionEntity execution, boolean createOnNotFound, boolean endTimeMustBeNull) Finds theHistoricActivityInstanceEntitythat is active in the given execution.findActivityInstance(ExecutionEntity execution, String activityId, boolean createOnNotFound, boolean endTimeMustBeNull) protected EntityCacheprotected HistoricActivityInstanceEntitygetHistoricActivityInstanceFromCache(String executionId, String activityId, boolean endTimeMustBeNull) booleanbooleanprotected StringparseActivityType(org.activiti.bpmn.model.FlowElement element) voidrecordActivityEnd(ExecutionEntity executionEntity, String deleteReason) Record the end of an activity, if activity history is enabled.voidrecordActivityStart(ExecutionEntity executionEntity) Record the start of an activity, if activity history is enabled.voidrecordHistoricDetailVariableCreate(VariableInstanceEntity variable, ExecutionEntity sourceActivityExecution, boolean useActivityId) Record a variable has been created, if audit history is enabled.voidrecordIdentityLinkCreated(IdentityLinkEntity identityLink) Record the creation of a newIdentityLink, if audit history is enabled.voidrecordProcessDefinitionChange(String processInstanceId, String processDefinitionId) Record a change of the process-definition id of a process instance, if activity history is enabled.voidrecordProcessInstanceEnd(String processInstanceId, String deleteReason, String activityId) Record a process-instance ended.voidrecordProcessInstanceNameChange(String processInstanceId, String newName) Record a process-instance name change.voidrecordProcessInstanceStart(ExecutionEntity processInstance, org.activiti.bpmn.model.FlowElement startElement) Record a process-instance started and record start-event if activity history is enabled.voidrecordSubProcessInstanceStart(ExecutionEntity parentExecution, ExecutionEntity subProcessInstance, org.activiti.bpmn.model.FlowElement initialElement) Record a sub-process-instance started and alters the calledProcessinstanceId on the current active activity's historic counterpart.voidrecordTaskAssigneeChange(String taskId, String assignee) Record task assignee change, if audit history is enabled.voidRecord the assignment of task, if activity history is enabled.voidrecordTaskCategoryChange(String taskId, String category) Record task category change, if audit history is enabled.voidrecordTaskClaim(TaskEntity task) record task instance claim time, if audit history is enabledvoidrecordTaskCreated(TaskEntity task, ExecutionEntity execution) Record the creation of a task, if audit history is enabled.voidrecordTaskDefinitionKeyChange(String taskId, String taskDefinitionKey) Record task definition key change, if audit history is enabled.voidrecordTaskDescriptionChange(String taskId, String description) Record task description change, if audit history is enabled.voidrecordTaskDueDateChange(String taskId, Date dueDate) Record task due date change, if audit history is enabled.voidrecordTaskEnd(String taskId, String deleteReason) Record task as ended, if audit history is enabled.voidrecordTaskExecutionIdChange(String taskId, String executionId) Record task execution id change, if audit history is enabled.voidrecordTaskFormKeyChange(String taskId, String formKey) Record task form key change, if audit history is enabled.voidrecordTaskId(TaskEntity task) Record the id of a the task associated with a historic activity, if activity history is enabled.voidrecordTaskNameChange(String taskId, String taskName) Record task name change, if audit history is enabled.voidrecordTaskOwnerChange(String taskId, String owner) Record task owner change, if audit history is enabled.voidrecordTaskParentTaskIdChange(String taskId, String parentTaskId) Record task parent task id change, if audit history is enabled.voidrecordTaskPriorityChange(String taskId, int priority) Record task priority change, if audit history is enabled.voidrecordTaskProcessDefinitionChange(String taskId, String processDefinitionId) Record a change of the process-definition id of a task instance, if activity history is enabled.voidrecordVariableCreate(VariableInstanceEntity variable) Record a variable has been created, if audit history is enabled.voidrecordVariableRemoved(VariableInstanceEntity variable) Record a variable has been deleted, if audit history is enabled.voidrecordVariableUpdate(VariableInstanceEntity variable) Record a variable has been updated, if audit history is enabled.voidsetHistoryLevel(HistoryLevel historyLevel) voidupdateProcessBusinessKeyInHistory(ExecutionEntity processInstance) Methods inherited from class org.activiti.engine.impl.persistence.AbstractManager
getAsyncExecutor, getAttachmentEntityManager, getByteArrayEntityManager, getClock, getCommandContext, getCommandExecutor, getCommentEntityManager, getDeadLetterJobEntityManager, getDeploymentEntityManager, getEventDispatcher, getEventSubscriptionEntityManager, getExecutionEntityManager, getHistoricActivityInstanceEntityManager, getHistoricDetailEntityManager, getHistoricIdentityLinkEntityManager, getHistoricProcessInstanceEntityManager, getHistoricTaskInstanceEntityManager, getHistoricVariableInstanceEntityManager, getHistoryManager, getIdentityLinkEntityManager, getJobEntityManager, getJobManager, getModelEntityManager, getProcessDefinitionEntityManager, getProcessDefinitionInfoEntityManager, getProcessEngineConfiguration, getResourceEntityManager, getSession, getSuspendedJobEntityManager, getTaskEntityManager, getTimerJobEntityManager, getVariableInstanceEntityManager
-
Constructor Details
-
DefaultHistoryManager
public DefaultHistoryManager(ProcessEngineConfigurationImpl processEngineConfiguration, HistoryLevel historyLevel)
-
-
Method Details
-
isHistoryLevelAtLeast
- Specified by:
isHistoryLevelAtLeastin interfaceHistoryManager- Returns:
- true, if the configured history-level is equal to OR set to a higher value than the given level.
-
isHistoryEnabled
public boolean isHistoryEnabled()- Specified by:
isHistoryEnabledin interfaceHistoryManager- Returns:
- true, if history-level is configured to level other than "none".
-
recordProcessInstanceEnd
public void recordProcessInstanceEnd(String processInstanceId, String deleteReason, String activityId) Description copied from interface:HistoryManagerRecord a process-instance ended. Updates the historic process instance if activity history is enabled.- Specified by:
recordProcessInstanceEndin interfaceHistoryManager
-
recordProcessInstanceNameChange
Description copied from interface:HistoryManagerRecord a process-instance name change.- Specified by:
recordProcessInstanceNameChangein interfaceHistoryManager
-
recordProcessInstanceStart
public void recordProcessInstanceStart(ExecutionEntity processInstance, org.activiti.bpmn.model.FlowElement startElement) Description copied from interface:HistoryManagerRecord a process-instance started and record start-event if activity history is enabled.- Specified by:
recordProcessInstanceStartin interfaceHistoryManager
-
recordSubProcessInstanceStart
public void recordSubProcessInstanceStart(ExecutionEntity parentExecution, ExecutionEntity subProcessInstance, org.activiti.bpmn.model.FlowElement initialElement) Description copied from interface:HistoryManagerRecord a sub-process-instance started and alters the calledProcessinstanceId on the current active activity's historic counterpart. Only effective when activity history is enabled.- Specified by:
recordSubProcessInstanceStartin interfaceHistoryManager
-
recordActivityStart
Description copied from interface:HistoryManagerRecord the start of an activity, if activity history is enabled.- Specified by:
recordActivityStartin interfaceHistoryManager
-
recordActivityEnd
Description copied from interface:HistoryManagerRecord the end of an activity, if activity history is enabled.- Specified by:
recordActivityEndin interfaceHistoryManager
-
findActivityInstance
public HistoricActivityInstanceEntity findActivityInstance(ExecutionEntity execution, boolean createOnNotFound, boolean endTimeMustBeNull) Description copied from interface:HistoryManagerFinds theHistoricActivityInstanceEntitythat is active in the given execution.- Specified by:
findActivityInstancein interfaceHistoryManager
-
findActivityInstance
public HistoricActivityInstanceEntity findActivityInstance(ExecutionEntity execution, String activityId, boolean createOnNotFound, boolean endTimeMustBeNull) -
getHistoricActivityInstanceFromCache
protected HistoricActivityInstanceEntity getHistoricActivityInstanceFromCache(String executionId, String activityId, boolean endTimeMustBeNull) -
createHistoricActivityInstanceEntity
protected HistoricActivityInstanceEntity createHistoricActivityInstanceEntity(ExecutionEntity execution) -
recordProcessDefinitionChange
Description copied from interface:HistoryManagerRecord a change of the process-definition id of a process instance, if activity history is enabled.- Specified by:
recordProcessDefinitionChangein interfaceHistoryManager
-
recordTaskCreated
Description copied from interface:HistoryManagerRecord the creation of a task, if audit history is enabled.- Specified by:
recordTaskCreatedin interfaceHistoryManager
-
recordTaskAssignment
Description copied from interface:HistoryManagerRecord the assignment of task, if activity history is enabled.- Specified by:
recordTaskAssignmentin interfaceHistoryManager
-
recordTaskClaim
Description copied from interface:HistoryManagerrecord task instance claim time, if audit history is enabled- Specified by:
recordTaskClaimin interfaceHistoryManager- Parameters:
task-
-
recordTaskId
Description copied from interface:HistoryManagerRecord the id of a the task associated with a historic activity, if activity history is enabled.- Specified by:
recordTaskIdin interfaceHistoryManager
-
recordTaskEnd
Description copied from interface:HistoryManagerRecord task as ended, if audit history is enabled.- Specified by:
recordTaskEndin interfaceHistoryManager
-
recordTaskAssigneeChange
Description copied from interface:HistoryManagerRecord task assignee change, if audit history is enabled.- Specified by:
recordTaskAssigneeChangein interfaceHistoryManager
-
recordTaskOwnerChange
Description copied from interface:HistoryManagerRecord task owner change, if audit history is enabled.- Specified by:
recordTaskOwnerChangein interfaceHistoryManager
-
recordTaskNameChange
Description copied from interface:HistoryManagerRecord task name change, if audit history is enabled.- Specified by:
recordTaskNameChangein interfaceHistoryManager
-
recordTaskDescriptionChange
Description copied from interface:HistoryManagerRecord task description change, if audit history is enabled.- Specified by:
recordTaskDescriptionChangein interfaceHistoryManager
-
recordTaskDueDateChange
Description copied from interface:HistoryManagerRecord task due date change, if audit history is enabled.- Specified by:
recordTaskDueDateChangein interfaceHistoryManager
-
recordTaskPriorityChange
Description copied from interface:HistoryManagerRecord task priority change, if audit history is enabled.- Specified by:
recordTaskPriorityChangein interfaceHistoryManager
-
recordTaskCategoryChange
Description copied from interface:HistoryManagerRecord task category change, if audit history is enabled.- Specified by:
recordTaskCategoryChangein interfaceHistoryManager
-
recordTaskFormKeyChange
Description copied from interface:HistoryManagerRecord task form key change, if audit history is enabled.- Specified by:
recordTaskFormKeyChangein interfaceHistoryManager
-
recordTaskParentTaskIdChange
Description copied from interface:HistoryManagerRecord task parent task id change, if audit history is enabled.- Specified by:
recordTaskParentTaskIdChangein interfaceHistoryManager
-
recordTaskExecutionIdChange
Description copied from interface:HistoryManagerRecord task execution id change, if audit history is enabled.- Specified by:
recordTaskExecutionIdChangein interfaceHistoryManager
-
recordTaskDefinitionKeyChange
Description copied from interface:HistoryManagerRecord task definition key change, if audit history is enabled.- Specified by:
recordTaskDefinitionKeyChangein interfaceHistoryManager
-
recordTaskProcessDefinitionChange
Description copied from interface:HistoryManagerRecord a change of the process-definition id of a task instance, if activity history is enabled.- Specified by:
recordTaskProcessDefinitionChangein interfaceHistoryManager
-
recordVariableCreate
Description copied from interface:HistoryManagerRecord a variable has been created, if audit history is enabled.- Specified by:
recordVariableCreatein interfaceHistoryManager
-
recordHistoricDetailVariableCreate
public void recordHistoricDetailVariableCreate(VariableInstanceEntity variable, ExecutionEntity sourceActivityExecution, boolean useActivityId) Description copied from interface:HistoryManagerRecord a variable has been created, if audit history is enabled.- Specified by:
recordHistoricDetailVariableCreatein interfaceHistoryManager
-
recordVariableUpdate
Description copied from interface:HistoryManagerRecord a variable has been updated, if audit history is enabled.- Specified by:
recordVariableUpdatein interfaceHistoryManager
-
createIdentityLinkComment
public void createIdentityLinkComment(String taskId, String userId, String groupId, String type, boolean create) Description copied from interface:HistoryManagerCreates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.- Specified by:
createIdentityLinkCommentin interfaceHistoryManager
-
createUserIdentityLinkComment
public void createUserIdentityLinkComment(String taskId, String userId, String type, boolean create) Description copied from interface:HistoryManagerCreates a new comment to indicate a new userIdentityLinkhas been created or deleted, if history is enabled.- Specified by:
createUserIdentityLinkCommentin interfaceHistoryManager
-
createGroupIdentityLinkComment
public void createGroupIdentityLinkComment(String taskId, String groupId, String type, boolean create) Description copied from interface:HistoryManagerCreates a new comment to indicate a new groupIdentityLinkhas been created or deleted, if history is enabled.- Specified by:
createGroupIdentityLinkCommentin interfaceHistoryManager
-
createUserIdentityLinkComment
public void createUserIdentityLinkComment(String taskId, String userId, String type, boolean create, boolean forceNullUserId) Description copied from interface:HistoryManagerCreates a new comment to indicate a new userIdentityLinkhas been created or deleted, if history is enabled.- Specified by:
createUserIdentityLinkCommentin interfaceHistoryManager
-
createIdentityLinkComment
public void createIdentityLinkComment(String taskId, String userId, String groupId, String type, boolean create, boolean forceNullUserId) Description copied from interface:HistoryManagerCreates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.- Specified by:
createIdentityLinkCommentin interfaceHistoryManager
-
createProcessInstanceIdentityLinkComment
public void createProcessInstanceIdentityLinkComment(String processInstanceId, String userId, String groupId, String type, boolean create) Description copied from interface:HistoryManagerCreates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.- Specified by:
createProcessInstanceIdentityLinkCommentin interfaceHistoryManager
-
createProcessInstanceIdentityLinkComment
public void createProcessInstanceIdentityLinkComment(String processInstanceId, String userId, String groupId, String type, boolean create, boolean forceNullUserId) Description copied from interface:HistoryManagerCreates a new comment to indicate a newIdentityLinkhas been created or deleted, if history is enabled.- Specified by:
createProcessInstanceIdentityLinkCommentin interfaceHistoryManager
-
createAttachmentComment
public void createAttachmentComment(String taskId, String processInstanceId, String attachmentName, boolean create) Description copied from interface:HistoryManagerCreates a new comment to indicate a new attachment has been created or deleted, if history is enabled.- Specified by:
createAttachmentCommentin interfaceHistoryManager
-
recordIdentityLinkCreated
Description copied from interface:HistoryManagerRecord the creation of a newIdentityLink, if audit history is enabled.- Specified by:
recordIdentityLinkCreatedin interfaceHistoryManager
-
deleteHistoricIdentityLink
- Specified by:
deleteHistoricIdentityLinkin interfaceHistoryManager
-
updateProcessBusinessKeyInHistory
- Specified by:
updateProcessBusinessKeyInHistoryin interfaceHistoryManager
-
recordVariableRemoved
Description copied from interface:HistoryManagerRecord a variable has been deleted, if audit history is enabled.- Specified by:
recordVariableRemovedin interfaceHistoryManager
-
parseActivityType
-
getEntityCache
-
getHistoryLevel
-
setHistoryLevel
-