Class TaskHelper


  • public class TaskHelper
    extends Object
    Author:
    Tijs Rademakers, Joram Barrez
    • Constructor Detail

      • TaskHelper

        public TaskHelper()
    • Method Detail

      • logUserTaskCompleted

        protected static void logUserTaskCompleted​(TaskEntity taskEntity)
      • changeTaskAssignee

        public static void changeTaskAssignee​(TaskEntity taskEntity,
                                              String assignee)
      • changeTaskOwner

        public static void changeTaskOwner​(TaskEntity taskEntity,
                                           String owner)
      • insertTask

        public static void insertTask​(TaskEntity taskEntity,
                                      ExecutionEntity execution,
                                      boolean fireCreateEvent,
                                      boolean addEntityLinks)
      • insertTask

        public static void insertTask​(TaskEntity taskEntity,
                                      boolean fireCreateEvent)
      • addAssigneeIdentityLinks

        public static void addAssigneeIdentityLinks​(TaskEntity taskEntity)
      • addOwnerIdentityLink

        public static void addOwnerIdentityLink​(TaskEntity taskEntity,
                                                String owner)
      • deleteTasksForExecution

        public static void deleteTasksForExecution​(ExecutionEntity executionEntity,
                                                   Collection<TaskEntity> taskEntities,
                                                   String deleteReason)
        Deletes all tasks that relate to the same execution.
        Parameters:
        executionEntity - The ExecutionEntity to which the TaskEntity relate to.
        taskEntities - Tasks to be deleted. It is assumed that all TaskEntity instances need to be related to the same execution.
      • deleteTask

        public static void deleteTask​(TaskEntity task,
                                      String deleteReason,
                                      boolean cascade,
                                      boolean fireTaskListener,
                                      boolean fireEvents)
        Parameters:
        task - The task to be deleted.
        deleteReason - A delete reason that will be stored in the history tables.
        cascade - If true, the historical counterpart will be deleted, otherwise it will be updated with an end time.
        fireTaskListener - If true, the delete event of the task listener will be called.
        fireEvents - If true, the event dispatcher will be used to fire an event for the deletion.
      • internalDeleteTask

        protected static void internalDeleteTask​(TaskEntity task,
                                                 String deleteReason,
                                                 boolean cascade,
                                                 boolean executeTaskDelete,
                                                 boolean fireTaskListener,
                                                 boolean fireEvents)
      • handleTaskHistory

        protected static void handleTaskHistory​(CommandContext commandContext,
                                                TaskEntity task,
                                                String deleteReason,
                                                boolean cascade)
      • deleteTask

        public static void deleteTask​(String taskId,
                                      String deleteReason,
                                      boolean cascade)
      • deleteTasksByProcessInstanceId

        public static void deleteTasksByProcessInstanceId​(String processInstanceId,
                                                          String deleteReason,
                                                          boolean cascade)
      • deleteHistoricTaskInstancesByProcessInstanceId

        public static void deleteHistoricTaskInstancesByProcessInstanceId​(String processInstanceId)
      • bulkDeleteHistoricTaskInstancesForProcessInstanceIds

        public static void bulkDeleteHistoricTaskInstancesForProcessInstanceIds​(Collection<String> processInstanceIds)
      • deleteHistoricTask

        public static void deleteHistoricTask​(String taskId)
      • deleteHistoricTaskEventLogEntries

        public static void deleteHistoricTaskEventLogEntries​(String taskId)
      • getBoolean

        protected static Boolean getBoolean​(Object booleanObject)
      • fireAssignmentEvents

        protected static void fireAssignmentEvents​(TaskEntity taskEntity)