@PUT @Path("{taskId}/delegate") public Response delegateTask(@PathParam("taskId") String taskId, @QueryParam("delegatedActors") List<String> delegatedActors, @QueryParam("comment") String comment) { Framework.getService(DocumentRoutingService.class).delegateTask(getContext().getCoreSession(), taskId, delegatedActors, comment); return Response.ok().status(Status.OK).build(); }
/** * @since 5.8 */ public String delegateTask(TaskInfo taskInfo) { try { Framework.getLocalService(DocumentRoutingService.class).delegateTask( documentManager, taskInfo.getTaskId(), taskInfo.getActors(), taskInfo.getComment()); Events.instance().raiseEvent(TaskEventNames.WORKFLOW_TASK_DELEGATED); } catch (DocumentRouteException e) { log.error(e); facesMessages.add(StatusMessage.Severity.ERROR, messages.get("workflow.feedback.error.taskEnded")); } return null; }