/** 指定办理人 */ @Action(value = "taskassign") public String assignTransactor() throws Exception { String to = INPUT; if (task.getId() == null) { this.addErrorMessage("非法的任务"); } else { WorkflowInstance instance = workflowInstanceManager.getWorkflowInstance(task.getProcessInstanceId()); CompleteTaskTipType result = taskService.isNeedAssigningTransactor(instance, task); if (result == null) { result = taskService.isSubProcessNeedChoiceTransactor(task, instance); } switch (result) { case OK: this.addSuccessMessage(result.getContent()); to = input(); break; case MESSAGE: this.addErrorMessage(result.getContent()); to = INPUT; break; case RETURN_URL: candidates = taskService.getNextTasksCandidates(task); this.addErrorMessage("请选择办理人"); to = "assign"; break; case TACHE_CHOICE_URL: addActionMessage("请选择环节"); canChoiceTaches = result.getCanChoiceTaches(); to = choiceTache(); case SINGLE_TRANSACTOR_CHOICE: User temp; for (String tran : result.getCanChoiceTransactor()) { temp = userManager.getUserByLoginName(tran); if (temp != null) canChoiceTransactor.put(tran, temp.getName()); } moreTransactor = CompleteTaskTipType.SINGLE_TRANSACTOR_CHOICE.getContent().equals("true"); to = "singleTransactorChoice"; } } ApiFactory.getBussinessLogService().log("工作流管理", "指定办理人", ContextUtils.getSystemId("wf")); return to; }