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 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 task, String userId) static voidcompleteTask(TaskEntity taskEntity, String userId, Map<String, Object> variables, Map<String, Object> localVariables, Map<String, Object> transientVariables, Map<String, Object> localTransientVariables, CommandContext commandContext) static voiddeleteHistoricTask(String taskId) static voidstatic 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(TaskEntity task, String deleteReason, boolean cascade, boolean fireTaskListener, boolean fireEvents, FlowableEventDispatcher eventDispatcher, CommandContext commandContext) protected static voidhandleTaskHistory(TaskEntity task, String userId, String deleteReason, boolean cascade, CommandContext commandContext) static voidinsertTask(TaskEntity taskEntity, boolean fireCreateEvent) static voidinsertTask(TaskEntity taskEntity, ExecutionEntity execution, boolean fireCreateEvent, boolean addEntityLinks) protected static voidinternalDeleteTask(TaskEntity task, String userId, 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)
-
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- TheExecutionEntityto which theTaskEntityrelate to.taskEntities- Tasks to be deleted. It is assumed that allTaskEntityinstances 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
-