Package org.flowable.engine.impl.util
Class TaskHelper
java.lang.Object
org.flowable.engine.impl.util.TaskHelper
- Author:
- Tijs Rademakers, Joram Barrez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAssigneeIdentityLinks
(TaskEntity taskEntity) static void
addOwnerIdentityLink
(TaskEntity taskEntity, String owner) protected static void
bulkDeleteHistoricTaskInstances
(Collection<String> taskIds, ProcessEngineConfigurationImpl processEngineConfiguration) static void
bulkDeleteHistoricTaskInstancesForProcessInstanceIds
(Collection<String> processInstanceIds) static void
changeTaskAssignee
(TaskEntity taskEntity, String assignee) static void
changeTaskOwner
(TaskEntity taskEntity, String owner) static void
completeTask
(TaskEntity task, String userId) 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) static void
deleteHistoricTask
(String taskId) static void
static void
deleteHistoricTaskInstancesByProcessInstanceId
(String processInstanceId) static void
deleteTask
(String taskId, String deleteReason, boolean cascade) static void
deleteTask
(TaskEntity task, String deleteReason, boolean cascade, boolean fireTaskListener, boolean fireEvents) static void
deleteTasksByProcessInstanceId
(String processInstanceId, String deleteReason, boolean cascade) static void
deleteTasksForExecution
(ExecutionEntity executionEntity, Collection<TaskEntity> taskEntities, String deleteReason) Deletes all tasks that relate to the same execution.protected static void
executeTaskDelete
(TaskEntity task, CommandContext commandContext) protected static void
fireAssignmentEvents
(TaskEntity taskEntity) protected static void
fireTaskDeletedEvent
(TaskEntity task, CommandContext commandContext, FlowableEventDispatcher eventDispatcher) protected static Boolean
getBoolean
(Object booleanObject) protected static void
handleRelatedEntities
(TaskEntity task, String deleteReason, boolean cascade, boolean fireTaskListener, boolean fireEvents, FlowableEventDispatcher eventDispatcher, CommandContext commandContext) protected static void
handleTaskHistory
(TaskEntity task, String userId, String deleteReason, boolean cascade, CommandContext commandContext) static void
insertTask
(TaskEntity taskEntity, boolean fireCreateEvent) static void
insertTask
(TaskEntity taskEntity, ExecutionEntity execution, boolean fireCreateEvent, boolean addEntityLinks) protected static void
internalDeleteTask
(TaskEntity task, String userId, String deleteReason, boolean cascade, boolean executeTaskDelete, boolean fireTaskListener, boolean fireEvents) static boolean
isFormFieldValidationEnabled
(VariableContainer variableContainer, ProcessEngineConfigurationImpl processEngineConfiguration, String formFieldValidationExpression) protected static void
logUserTaskCompleted
(TaskEntity taskEntity) protected static void
storeTaskCompleter
(TaskEntity taskEntity, ExecutionEntity execution, ProcessEngineConfigurationImpl processEngineConfiguration)
-
Constructor Details
-
TaskHelper
public TaskHelper()
-
-
Method Details
-
completeTask
-
logUserTaskCompleted
-
storeTaskCompleter
protected static void storeTaskCompleter(TaskEntity taskEntity, ExecutionEntity execution, ProcessEngineConfigurationImpl processEngineConfiguration) -
changeTaskAssignee
-
changeTaskOwner
-
insertTask
public static void insertTask(TaskEntity taskEntity, ExecutionEntity execution, boolean fireCreateEvent, boolean addEntityLinks) -
insertTask
-
addAssigneeIdentityLinks
-
addOwnerIdentityLink
-
deleteTasksForExecution
public static void deleteTasksForExecution(ExecutionEntity executionEntity, Collection<TaskEntity> taskEntities, String deleteReason) Deletes all tasks that relate to the same execution.- Parameters:
executionEntity
- TheExecutionEntity
to which theTaskEntity
relate to.taskEntities
- Tasks to be deleted. It is assumed that allTaskEntity
instances need to be related to the same execution.
-
completeTask
-
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
-
fireTaskDeletedEvent
protected static void fireTaskDeletedEvent(TaskEntity task, CommandContext commandContext, FlowableEventDispatcher eventDispatcher) -
deleteTask
-
deleteTasksByProcessInstanceId
-
deleteHistoricTaskInstancesByProcessInstanceId
-
bulkDeleteHistoricTaskInstancesForProcessInstanceIds
public static void bulkDeleteHistoricTaskInstancesForProcessInstanceIds(Collection<String> processInstanceIds) -
deleteHistoricTask
-
deleteHistoricTaskEventLogEntries
-
isFormFieldValidationEnabled
public static boolean isFormFieldValidationEnabled(VariableContainer variableContainer, ProcessEngineConfigurationImpl processEngineConfiguration, String formFieldValidationExpression) -
bulkDeleteHistoricTaskInstances
protected static void bulkDeleteHistoricTaskInstances(Collection<String> taskIds, ProcessEngineConfigurationImpl processEngineConfiguration) -
getBoolean
-
fireAssignmentEvents
-