Package org.flowable.engine.impl.util
Class TaskHelper
- java.lang.Object
-
- org.flowable.engine.impl.util.TaskHelper
-
public class TaskHelper extends Object
- Author:
- Tijs Rademakers, Joram Barrez
-
-
Constructor Summary
Constructors Constructor Description TaskHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddAssigneeIdentityLinks(TaskEntity taskEntity)static voidaddOwnerIdentityLink(TaskEntity taskEntity, String owner)protected static voidbulkDeleteHistoricTaskInstances(Collection<String> taskIds, ProcessEngineConfigurationImpl processEngineConfiguration)static voidbulkDeleteHistoricTaskInstancesForProcessInstanceIds(Collection<String> processInstanceIds)static voidchangeTaskAssignee(TaskEntity taskEntity, String assignee)static voidchangeTaskOwner(TaskEntity taskEntity, String owner)static voidcompleteTask(TaskEntity taskEntity, Map<String,Object> variables, Map<String,Object> localVariables, Map<String,Object> transientVariables, Map<String,Object> localTransientVariables, CommandContext commandContext)static voiddeleteHistoricTask(String taskId)static voiddeleteHistoricTaskEventLogEntries(String taskId)static voiddeleteHistoricTaskInstancesByProcessInstanceId(String processInstanceId)static voiddeleteTask(String taskId, String deleteReason, boolean cascade)static voiddeleteTask(TaskEntity task, String deleteReason, boolean cascade, boolean fireTaskListener, boolean fireEvents)static voiddeleteTasksByProcessInstanceId(String processInstanceId, String deleteReason, boolean cascade)static voiddeleteTasksForExecution(ExecutionEntity executionEntity, Collection<TaskEntity> taskEntities, String deleteReason)Deletes all tasks that relate to the same execution.protected static voidexecuteTaskDelete(TaskEntity task, CommandContext commandContext)protected static voidfireAssignmentEvents(TaskEntity taskEntity)protected static voidfireTaskDeletedEvent(TaskEntity task, CommandContext commandContext, FlowableEventDispatcher eventDispatcher)protected static BooleangetBoolean(Object booleanObject)protected static voidhandleRelatedEntities(CommandContext commandContext, TaskEntity task, String deleteReason, boolean cascade, boolean fireTaskListener, boolean fireEvents, FlowableEventDispatcher eventDispatcher)protected static voidhandleTaskHistory(CommandContext commandContext, TaskEntity task, String deleteReason, boolean cascade)static voidinsertTask(TaskEntity taskEntity, boolean fireCreateEvent)static voidinsertTask(TaskEntity taskEntity, ExecutionEntity execution, boolean fireCreateEvent, boolean addEntityLinks)protected static voidinternalDeleteTask(TaskEntity task, String deleteReason, boolean cascade, boolean executeTaskDelete, boolean fireTaskListener, boolean fireEvents)static booleanisFormFieldValidationEnabled(VariableContainer variableContainer, ProcessEngineConfigurationImpl processEngineConfiguration, String formFieldValidationExpression)protected static voidlogUserTaskCompleted(TaskEntity taskEntity)protected static voidstoreTaskCompleter(TaskEntity taskEntity, ExecutionEntity execution, ProcessEngineConfigurationImpl processEngineConfiguration)
-
-
-
Method Detail
-
completeTask
public static void completeTask(TaskEntity taskEntity, 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- TheExecutionEntityto which theTaskEntityrelate to.taskEntities- Tasks to be deleted. It is assumed that allTaskEntityinstances 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)
-
handleRelatedEntities
protected static void handleRelatedEntities(CommandContext commandContext, TaskEntity task, String deleteReason, boolean cascade, boolean fireTaskListener, boolean fireEvents, FlowableEventDispatcher eventDispatcher)
-
handleTaskHistory
protected static void handleTaskHistory(CommandContext commandContext, TaskEntity task, String deleteReason, boolean cascade)
-
executeTaskDelete
protected static void executeTaskDelete(TaskEntity task, CommandContext commandContext)
-
fireTaskDeletedEvent
protected static void fireTaskDeletedEvent(TaskEntity task, CommandContext commandContext, FlowableEventDispatcher eventDispatcher)
-
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)
-
fireAssignmentEvents
protected static void fireAssignmentEvents(TaskEntity taskEntity)
-
-