Class TaskHelper

java.lang.Object
org.flowable.engine.impl.util.TaskHelper

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

    • TaskHelper

      public TaskHelper()
  • Method Details

    • completeTask

      public static void completeTask(TaskEntity taskEntity, String userId, Map<String,Object> variables, Map<String,Object> localVariables, Map<String,Object> transientVariables, Map<String,Object> localTransientVariables, CommandContext commandContext)
    • logUserTaskCompleted

      protected static void logUserTaskCompleted(TaskEntity taskEntity)
    • storeTaskCompleter

      protected static void storeTaskCompleter(TaskEntity taskEntity, ExecutionEntity execution, ProcessEngineConfigurationImpl processEngineConfiguration)
    • 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.
    • completeTask

      public static void completeTask(TaskEntity task, String userId)
    • 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 userId, String deleteReason, boolean cascade, boolean executeTaskDelete, boolean fireTaskListener, boolean fireEvents)
    • handleRelatedEntities

      protected static void handleRelatedEntities(TaskEntity task, String deleteReason, boolean cascade, boolean fireTaskListener, boolean fireEvents, FlowableEventDispatcher eventDispatcher, CommandContext commandContext)
    • handleTaskHistory

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

      protected static void executeTaskDelete(TaskEntity task, CommandContext commandContext)
    • fireTaskDeletedEvent

      protected static void fireTaskDeletedEvent(TaskEntity task, CommandContext commandContext, FlowableEventDispatcher eventDispatcher)
    • 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)
    • isFormFieldValidationEnabled

      public static boolean isFormFieldValidationEnabled(VariableContainer variableContainer, ProcessEngineConfigurationImpl processEngineConfiguration, String formFieldValidationExpression)
    • bulkDeleteHistoricTaskInstances

      protected static void bulkDeleteHistoricTaskInstances(Collection<String> taskIds, ProcessEngineConfigurationImpl processEngineConfiguration)
    • getBoolean

      protected static Boolean getBoolean(Object booleanObject)
    • fireAssignmentEvents

      protected static void fireAssignmentEvents(TaskEntity taskEntity)