Class DefaultHistoryManager

  • All Implemented Interfaces:
    HistoryManager

    public class DefaultHistoryManager
    extends AbstractManager
    implements HistoryManager
    Manager class that centralises recording of all history-related operations that are originated from inside the engine.
    • Method Detail

      • isHistoryLevelAtLeast

        public boolean isHistoryLevelAtLeast​(HistoryLevel level)
        Specified by:
        isHistoryLevelAtLeast in interface HistoryManager
        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:
        isHistoryEnabled in interface HistoryManager
        Returns:
        true, if history-level is configured to level other than "none".
      • recordProcessInstanceEnd

        public void recordProcessInstanceEnd​(java.lang.String processInstanceId,
                                             java.lang.String deleteReason,
                                             java.lang.String activityId)
        Description copied from interface: HistoryManager
        Record a process-instance ended. Updates the historic process instance if activity history is enabled.
        Specified by:
        recordProcessInstanceEnd in interface HistoryManager
      • recordProcessInstanceNameChange

        public void recordProcessInstanceNameChange​(java.lang.String processInstanceId,
                                                    java.lang.String newName)
        Description copied from interface: HistoryManager
        Record a process-instance name change.
        Specified by:
        recordProcessInstanceNameChange in interface HistoryManager
      • recordProcessInstanceStart

        public void recordProcessInstanceStart​(ExecutionEntity processInstance,
                                               org.activiti.bpmn.model.FlowElement startElement)
        Description copied from interface: HistoryManager
        Record a process-instance started and record start-event if activity history is enabled.
        Specified by:
        recordProcessInstanceStart in interface HistoryManager
      • recordSubProcessInstanceStart

        public void recordSubProcessInstanceStart​(ExecutionEntity parentExecution,
                                                  ExecutionEntity subProcessInstance,
                                                  org.activiti.bpmn.model.FlowElement initialElement)
        Description copied from interface: HistoryManager
        Record 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:
        recordSubProcessInstanceStart in interface HistoryManager
      • getHistoricActivityInstanceFromCache

        protected HistoricActivityInstanceEntity getHistoricActivityInstanceFromCache​(java.lang.String executionId,
                                                                                      java.lang.String activityId,
                                                                                      boolean endTimeMustBeNull)
      • recordProcessDefinitionChange

        public void recordProcessDefinitionChange​(java.lang.String processInstanceId,
                                                  java.lang.String processDefinitionId)
        Description copied from interface: HistoryManager
        Record a change of the process-definition id of a process instance, if activity history is enabled.
        Specified by:
        recordProcessDefinitionChange in interface HistoryManager
      • recordTaskId

        public void recordTaskId​(TaskEntity task)
        Description copied from interface: HistoryManager
        Record the id of a the task associated with a historic activity, if activity history is enabled.
        Specified by:
        recordTaskId in interface HistoryManager
      • recordTaskEnd

        public void recordTaskEnd​(java.lang.String taskId,
                                  java.lang.String deleteReason)
        Description copied from interface: HistoryManager
        Record task as ended, if audit history is enabled.
        Specified by:
        recordTaskEnd in interface HistoryManager
      • recordTaskAssigneeChange

        public void recordTaskAssigneeChange​(java.lang.String taskId,
                                             java.lang.String assignee)
        Description copied from interface: HistoryManager
        Record task assignee change, if audit history is enabled.
        Specified by:
        recordTaskAssigneeChange in interface HistoryManager
      • recordTaskOwnerChange

        public void recordTaskOwnerChange​(java.lang.String taskId,
                                          java.lang.String owner)
        Description copied from interface: HistoryManager
        Record task owner change, if audit history is enabled.
        Specified by:
        recordTaskOwnerChange in interface HistoryManager
      • recordTaskNameChange

        public void recordTaskNameChange​(java.lang.String taskId,
                                         java.lang.String taskName)
        Description copied from interface: HistoryManager
        Record task name change, if audit history is enabled.
        Specified by:
        recordTaskNameChange in interface HistoryManager
      • recordTaskDescriptionChange

        public void recordTaskDescriptionChange​(java.lang.String taskId,
                                                java.lang.String description)
        Description copied from interface: HistoryManager
        Record task description change, if audit history is enabled.
        Specified by:
        recordTaskDescriptionChange in interface HistoryManager
      • recordTaskDueDateChange

        public void recordTaskDueDateChange​(java.lang.String taskId,
                                            java.util.Date dueDate)
        Description copied from interface: HistoryManager
        Record task due date change, if audit history is enabled.
        Specified by:
        recordTaskDueDateChange in interface HistoryManager
      • recordTaskPriorityChange

        public void recordTaskPriorityChange​(java.lang.String taskId,
                                             int priority)
        Description copied from interface: HistoryManager
        Record task priority change, if audit history is enabled.
        Specified by:
        recordTaskPriorityChange in interface HistoryManager
      • recordTaskCategoryChange

        public void recordTaskCategoryChange​(java.lang.String taskId,
                                             java.lang.String category)
        Description copied from interface: HistoryManager
        Record task category change, if audit history is enabled.
        Specified by:
        recordTaskCategoryChange in interface HistoryManager
      • recordTaskFormKeyChange

        public void recordTaskFormKeyChange​(java.lang.String taskId,
                                            java.lang.String formKey)
        Description copied from interface: HistoryManager
        Record task form key change, if audit history is enabled.
        Specified by:
        recordTaskFormKeyChange in interface HistoryManager
      • recordTaskParentTaskIdChange

        public void recordTaskParentTaskIdChange​(java.lang.String taskId,
                                                 java.lang.String parentTaskId)
        Description copied from interface: HistoryManager
        Record task parent task id change, if audit history is enabled.
        Specified by:
        recordTaskParentTaskIdChange in interface HistoryManager
      • recordTaskExecutionIdChange

        public void recordTaskExecutionIdChange​(java.lang.String taskId,
                                                java.lang.String executionId)
        Description copied from interface: HistoryManager
        Record task execution id change, if audit history is enabled.
        Specified by:
        recordTaskExecutionIdChange in interface HistoryManager
      • recordTaskDefinitionKeyChange

        public void recordTaskDefinitionKeyChange​(java.lang.String taskId,
                                                  java.lang.String taskDefinitionKey)
        Description copied from interface: HistoryManager
        Record task definition key change, if audit history is enabled.
        Specified by:
        recordTaskDefinitionKeyChange in interface HistoryManager
      • recordTaskProcessDefinitionChange

        public void recordTaskProcessDefinitionChange​(java.lang.String taskId,
                                                      java.lang.String processDefinitionId)
        Description copied from interface: HistoryManager
        Record a change of the process-definition id of a task instance, if activity history is enabled.
        Specified by:
        recordTaskProcessDefinitionChange in interface HistoryManager
      • createIdentityLinkComment

        public void createIdentityLinkComment​(java.lang.String taskId,
                                              java.lang.String userId,
                                              java.lang.String groupId,
                                              java.lang.String type,
                                              boolean create)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new IdentityLink has been created or deleted, if history is enabled.
        Specified by:
        createIdentityLinkComment in interface HistoryManager
      • createUserIdentityLinkComment

        public void createUserIdentityLinkComment​(java.lang.String taskId,
                                                  java.lang.String userId,
                                                  java.lang.String type,
                                                  boolean create)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new user IdentityLink has been created or deleted, if history is enabled.
        Specified by:
        createUserIdentityLinkComment in interface HistoryManager
      • createGroupIdentityLinkComment

        public void createGroupIdentityLinkComment​(java.lang.String taskId,
                                                   java.lang.String groupId,
                                                   java.lang.String type,
                                                   boolean create)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new group IdentityLink has been created or deleted, if history is enabled.
        Specified by:
        createGroupIdentityLinkComment in interface HistoryManager
      • createUserIdentityLinkComment

        public void createUserIdentityLinkComment​(java.lang.String taskId,
                                                  java.lang.String userId,
                                                  java.lang.String type,
                                                  boolean create,
                                                  boolean forceNullUserId)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new user IdentityLink has been created or deleted, if history is enabled.
        Specified by:
        createUserIdentityLinkComment in interface HistoryManager
      • createIdentityLinkComment

        public void createIdentityLinkComment​(java.lang.String taskId,
                                              java.lang.String userId,
                                              java.lang.String groupId,
                                              java.lang.String type,
                                              boolean create,
                                              boolean forceNullUserId)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new IdentityLink has been created or deleted, if history is enabled.
        Specified by:
        createIdentityLinkComment in interface HistoryManager
      • createProcessInstanceIdentityLinkComment

        public void createProcessInstanceIdentityLinkComment​(java.lang.String processInstanceId,
                                                             java.lang.String userId,
                                                             java.lang.String groupId,
                                                             java.lang.String type,
                                                             boolean create)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new IdentityLink has been created or deleted, if history is enabled.
        Specified by:
        createProcessInstanceIdentityLinkComment in interface HistoryManager
      • createProcessInstanceIdentityLinkComment

        public void createProcessInstanceIdentityLinkComment​(java.lang.String processInstanceId,
                                                             java.lang.String userId,
                                                             java.lang.String groupId,
                                                             java.lang.String type,
                                                             boolean create,
                                                             boolean forceNullUserId)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new IdentityLink has been created or deleted, if history is enabled.
        Specified by:
        createProcessInstanceIdentityLinkComment in interface HistoryManager
      • createAttachmentComment

        public void createAttachmentComment​(java.lang.String taskId,
                                            java.lang.String processInstanceId,
                                            java.lang.String attachmentName,
                                            boolean create)
        Description copied from interface: HistoryManager
        Creates a new comment to indicate a new attachment has been created or deleted, if history is enabled.
        Specified by:
        createAttachmentComment in interface HistoryManager
      • parseActivityType

        protected java.lang.String parseActivityType​(org.activiti.bpmn.model.FlowElement element)
      • getEntityCache

        protected EntityCache getEntityCache()
      • setHistoryLevel

        public void setHistoryLevel​(HistoryLevel historyLevel)