public void delete(String deleteReason, boolean cascade, boolean skipCustomListeners) { this.skipCustomListeners = skipCustomListeners; delete(deleteReason, cascade); }
((TaskEntity) subTask).delete(deleteReason, cascade, skipCustomListeners);
public void delete(String deleteReason, boolean cascade, boolean skipCustomListeners) { this.skipCustomListeners = skipCustomListeners; delete(deleteReason, cascade); }
((TaskEntity) subTask).delete(deleteReason, cascade, skipCustomListeners);
protected void terminating(CmmnActivityExecution execution) { TaskEntity task = getTask(execution); // it can happen that a there does not exist // a task, because the given execution was never // active. if (task != null) { task.delete("terminated", false); } }
protected void terminating(CmmnActivityExecution execution) { TaskEntity task = getTask(execution); // it can happen that a there does not exist // a task, because the given execution was never // active. if (task != null) { task.delete("terminated", false); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public void deleteTasksByCaseInstanceId(String caseInstanceId, String deleteReason, boolean cascade) { List<TaskEntity> tasks = (List) getDbEntityManager() .createTaskQuery() .caseInstanceId(caseInstanceId) .list(); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; for (TaskEntity task: tasks) { task.delete(reason, cascade, false); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public void deleteTasksByProcessInstanceId(String processInstanceId, String deleteReason, boolean cascade, boolean skipCustomListeners) { List<TaskEntity> tasks = (List) getDbEntityManager() .createTaskQuery() .processInstanceId(processInstanceId) .list(); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; for (TaskEntity task: tasks) { task.delete(reason, cascade, skipCustomListeners); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public void deleteTasksByCaseInstanceId(String caseInstanceId, String deleteReason, boolean cascade) { List<TaskEntity> tasks = (List) getDbEntityManager() .createTaskQuery() .caseInstanceId(caseInstanceId) .list(); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; for (TaskEntity task: tasks) { task.delete(reason, cascade, false); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public void deleteTasksByProcessInstanceId(String processInstanceId, String deleteReason, boolean cascade, boolean skipCustomListeners) { List<TaskEntity> tasks = (List) getDbEntityManager() .createTaskQuery() .processInstanceId(processInstanceId) .list(); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; for (TaskEntity task: tasks) { task.delete(reason, cascade, skipCustomListeners); } }
protected void deleteTask(String taskId, CommandContext commandContext) { TaskManager taskManager = commandContext.getTaskManager(); TaskEntity task = taskManager.findTaskById(taskId); if (task != null) { if(task.getExecutionId() != null) { throw new ProcessEngineException("The task cannot be deleted because is part of a running process"); } else if (task.getCaseExecutionId() != null) { throw new ProcessEngineException("The task cannot be deleted because is part of a running case instance"); } checkDeleteTask(task, commandContext); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; task.delete(reason, cascade); } else if (cascade) { Context .getCommandContext() .getHistoricTaskInstanceManager() .deleteHistoricTaskInstanceById(taskId); } }
protected void deleteTask(String taskId, CommandContext commandContext) { TaskManager taskManager = commandContext.getTaskManager(); TaskEntity task = taskManager.findTaskById(taskId); if (task != null) { if(task.getExecutionId() != null) { throw new ProcessEngineException("The task cannot be deleted because is part of a running process"); } else if (task.getCaseExecutionId() != null) { throw new ProcessEngineException("The task cannot be deleted because is part of a running case instance"); } checkDeleteTask(task, commandContext); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; task.delete(reason, cascade); } else if (cascade) { Context .getCommandContext() .getHistoricTaskInstanceManager() .deleteHistoricTaskInstanceById(taskId); } }
protected void removeTasks(String reason) { if (reason == null) { reason = TaskEntity.DELETE_REASON_DELETED; } for (TaskEntity task : getTasks()) { if (isReplacedByParent()) { if (task.getExecution() == null || task.getExecution() != replacedBy) { // All tasks should have been moved when "replacedBy" has been set. // Just in case tasks where added, // wo do an additional check here and move it task.setExecution(replacedBy); this.getReplacedBy().addTask(task); } } else { task.delete(reason, false, skipCustomListeners); } } }
protected void removeTasks(String reason) { if (reason == null) { reason = TaskEntity.DELETE_REASON_DELETED; } for (TaskEntity task : getTasks()) { if (isReplacedByParent()) { if (task.getExecution() == null || task.getExecution() != replacedBy) { // All tasks should have been moved when "replacedBy" has been set. // Just in case tasks where added, // wo do an additional check here and move it task.setExecution(replacedBy); this.getReplacedBy().addTask(task); } } else { task.delete(reason, false, skipCustomListeners); } } }
public void delete(String deleteReason, boolean cascade, boolean skipCustomListeners) { this.skipCustomListeners = skipCustomListeners; delete(deleteReason, cascade); }
protected void terminating(CmmnActivityExecution execution) { TaskEntity task = getTask(execution); // it can happen that a there does not exist // a task, because the given execution was never // active. if (task != null) { task.delete("terminated", false); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public void deleteTasksByProcessInstanceId(String processInstanceId, String deleteReason, boolean cascade, boolean skipCustomListeners) { List<TaskEntity> tasks = (List) getDbEntityManager() .createTaskQuery() .processInstanceId(processInstanceId) .list(); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; for (TaskEntity task: tasks) { task.delete(reason, cascade, skipCustomListeners); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public void deleteTasksByCaseInstanceId(String caseInstanceId, String deleteReason, boolean cascade) { List<TaskEntity> tasks = (List) getDbEntityManager() .createTaskQuery() .caseInstanceId(caseInstanceId) .list(); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; for (TaskEntity task: tasks) { task.delete(reason, cascade, false); } }
protected void removeTasks(String reason) { if (reason == null) { reason = TaskEntity.DELETE_REASON_DELETED; } for (TaskEntity task : getTasks()) { if (isReplacedByParent()) { if (task.getExecution() == null || task.getExecution() != replacedBy) { // All tasks should have been moved when "replacedBy" has been set. // Just in case tasks where added, // wo do an additional check here and move it task.setExecution(replacedBy); this.getReplacedBy().addTask(task); } } else { task.delete(reason, false, skipCustomListeners); } } }
protected void deleteTask(String taskId, CommandContext commandContext) { TaskManager taskManager = commandContext.getTaskManager(); TaskEntity task = taskManager.findTaskById(taskId); if (task != null) { if(task.getExecutionId() != null) { throw new ProcessEngineException("The task cannot be deleted because is part of a running process"); } else if (task.getCaseExecutionId() != null) { throw new ProcessEngineException("The task cannot be deleted because is part of a running case instance"); } checkDeleteTask(task, commandContext); String reason = (deleteReason == null || deleteReason.length() == 0) ? TaskEntity.DELETE_REASON_DELETED : deleteReason; task.delete(reason, cascade); } else if (cascade) { Context .getCommandContext() .getHistoricTaskInstanceManager() .deleteHistoricTaskInstanceById(taskId); } }