Пример #1
0
  /** 提交表单 */
  public String submit() throws Exception {
    log.debug("*** submit 方法开始");
    log.debug(
        new StringBuilder("*** Received parameter:[")
            .append("taskId:")
            .append(taskId)
            .append("]")
            .toString());

    task = taskService.getWorkflowTask(taskId);
    String to = "";
    CompleteTaskTipType result = workflowInstanceManager.submitForm(task);
    switch (result) {
      case OK:
        this.addSuccessMessage(result.getContent());
        to = input();
        break;
      case MESSAGE:
        this.addErrorMessage(result.getContent());
        to = INPUT;
        break;
      case RETURN_URL:
        to = assignTransactor();
        break;
      case TACHE_CHOICE_URL:
        canChoiceTaches = result.getCanChoiceTaches();
        to = choiceTache();
        break;
    }
    ApiFactory.getBussinessLogService().log("工作流管理", "提交表单", ContextUtils.getSystemId("wf"));
    return to;
  }
Пример #2
0
 public void prepareSaveForm() throws Exception {
   if (taskId != null) {
     task = taskService.getWorkflowTask(taskId);
   } else {
     task = new WorkflowTask();
   }
 }
Пример #3
0
 @Override
 protected void prepareModel() throws Exception {
   if (taskId != null) {
     task = taskService.getWorkflowTask(taskId);
   } else {
     task = new WorkflowTask();
   }
 }
Пример #4
0
 /**
  * 流程监控/保存更改的办理人
  *
  * @return
  * @throws Exception
  */
 public String changeTransactorSave() throws Exception {
   taskService.changeTransactor(taskId, transactor);
   task = taskService.getWorkflowTask(taskId);
   workflowId = task.getProcessInstanceId();
   workflowInstance = workflowInstanceManager.getWorkflowInstance(workflowId);
   // 更改办理人业务补偿
   taskService.changeTransactorSet(workflowInstance, transactor, task.getId());
   ApiFactory.getBussinessLogService().log("流程监控", "更改办理人", ContextUtils.getSystemId("wf"));
   this.addSuccessMessage("办理人已更改");
   return changeTransactor();
 }
Пример #5
0
 /**
  * 完成交办
  *
  * @return
  * @throws Exception
  */
 public String assignTo() throws Exception {
   task = taskService.getWorkflowTask(taskId);
   newTransactor = transactors.toString().replace(" ", "").replace("[", "").replace("]", "");
   taskService.completeWorkflowTask(
       task,
       TaskProcessingResult.ASSIGN,
       TaskSetting.getTaskSettingInstance().setAssignmentTransactors(newTransactor));
   ApiFactory.getBussinessLogService().log("工作流管理", "完成交办任务", ContextUtils.getSystemId("wf"));
   this.addSuccessMessage("任务交办成功");
   return input();
 }
Пример #6
0
 /**
  * 完成分发
  *
  * @return
  * @throws Exception
  */
 public String distribute() throws Exception {
   CompleteTaskTipType completeTaskTipType =
       taskService.completeDistributeTask(taskId, transactors);
   if (CompleteTaskTipType.RETURN_URL == completeTaskTipType) {
     return assignTransactor();
   } else {
     this.addSuccessMessage(completeTaskTipType.getContent());
     task = taskService.getWorkflowTask(taskId);
     ApiFactory.getBussinessLogService().log("工作流管理", "完成分发任务", ContextUtils.getSystemId("wf"));
     return input();
   }
 }