protected void claimTask(Task task, TaskActionRequest actionRequest) { // In case the task is already claimed, a ActivitiTaskAlreadyClaimedException is thown and // converted to // a CONFLICT response by the StatusService ActivitiUtil.getTaskService().claim(task.getId(), actionRequest.getAssignee()); }
protected void delegateTask(Task task, TaskActionRequest actionRequest) { if (actionRequest.getAssignee() == null) { throw new ActivitiIllegalArgumentException("An assignee is required when delegating a task."); } ActivitiUtil.getTaskService().delegateTask(task.getId(), actionRequest.getAssignee()); }