Package com.founder.fix.fixflow.core.exception

Examples of com.founder.fix.fixflow.core.exception.FixFlowBizException


   
   
    if(taskId==null||taskId.equals("")){
     
      if(processInstanceId==null||processInstanceId.equals("")){
        throw new FixFlowBizException("模拟执行的流程实例编号不能为空!");
      }
     
      ProcessInstance processInstance=commandContext.getProcessInstanceManager().findProcessInstanceById(processInstanceId);
      if(processInstance==null){
        throw new FixFlowBizException("流程实例没找到");
      }
      ProcessInstanceEntity processInstanceEntity=(ProcessInstanceEntity)processInstance;
     
     
      List<TaskInstanceEntity> taskInstanceEntities= processInstanceEntity.getTaskMgmtInstance().getTaskInstanceEntitys();
      List<TaskInstance> taskInstances=new ArrayList<TaskInstance>();
      for (TaskInstanceEntity taskInstanceEntity : taskInstanceEntities) {
        if(!taskInstanceEntity.hasEnded()){
          taskInstances.add(taskInstanceEntity);
        }
       
      }
      return taskInstances;
     
    }
    else{
     
     
      if(taskId==null||taskId.equals("")){
        throw new FixFlowBizException("模拟执行的任务编号不能为空!");
      }
     
     
     
     
     
     
      TaskInstance taskInstance=commandContext.getTaskManager().findTaskById(taskId);
     
   
     
     
      if(taskInstance==null){
        throw new FixFlowBizException("模拟执行的任务无法找到!");
      }
     
      String tokenIdString=taskInstance.getTokenId();
     
     
      if(!taskInstance.hasEnded()){
        throw new FixFlowBizException("模拟执行的当前任务必须已经结束!");
      }
     
      ProcessInstance processInstance=commandContext.getProcessInstanceManager().findProcessInstanceById(taskInstance.getProcessInstanceId());
     
      if(processInstance==null){
        throw new FixFlowBizException("未能找到任务对应的流程实例");
      }
      ProcessInstanceEntity processInstanceEntity=(ProcessInstanceEntity)processInstance;
      TokenEntity tokenEntity=processInstanceEntity.getTokenMap().get(tokenIdString);
     
     
View Full Code Here


    if(deployment.getUpdateDeploymentId()!=null&&!deployment.getUpdateDeploymentId().equals("")){
     
      DeploymentEntity deploymentOld=Context.getCommandContext().getDeploymentManager().findDeploymentById(deployment.getUpdateDeploymentId());
     
      if(deploymentOld.getResources().keySet().size()!=2){
        throw new FixFlowBizException("资源发布号,中不存在流程定义和流程图两个文件!");
      }
     
 
     
     
View Full Code Here

     
    }else{
     
     
     
      throw new FixFlowBizException("定时任务启动失败");
     
    }
   
    return null;
   
View Full Code Here

              triggers.add(trigger);
            }
          }
          jobList.put(job, triggers);
        }else{
          throw new FixFlowBizException("定时任务节点没有设置时间!");
        }
       
     
       
      }
View Full Code Here

    }else{
      if(this.processDefinitionKey!=null&&!this.processDefinitionKey.equals("")){
        processDefinitionBehavior=commandContext.getProcessDefinitionManager().findLatestProcessDefinitionByKey(processDefinitionKey);
      }
      else{
        throw new FixFlowBizException("查询流程图的processDefinitionId、processDefinitionKey不能都为空!");
      }
    }
   
    String deploymentId=processDefinitionBehavior.getDeploymentId();
    String diagramResourceName=processDefinitionBehavior.getDiagramResourceName();
View Full Code Here

    }else{
      if(this.processDefinitionKey!=null&&!this.processDefinitionKey.equals("")){
        processDefinitionBehavior=commandContext.getProcessDefinitionManager().findLatestProcessDefinitionByKey(processDefinitionKey);
      }
      else{
        throw new FixFlowBizException("查询流程图的processDefinitionId、processDefinitionKey不能都为空!");
      }
    }
   
    definitions = processDefinitionBehavior.getDefinitions();
   
View Full Code Here

  public void addJobDetailEntity(String bizKey,String bizValue,String bizObj){
   
    if(bizKey==null||bizKey.equals("")){
     
      throw new FixFlowBizException("bizKey不能为空!");
     
    }

    JobDetailEntity jobDetailEntity=new JobDetailEntity();
    jobDetailEntity.setId(this.id);
View Full Code Here

  public List<TaskInstance> execute(CommandContext commandContext) {
   
   
    TaskManager taskManager = commandContext.getTaskManager();
    if(taskId==null||taskId.equals("")){
      throw new FixFlowBizException("taskId 不能为空");
    }
    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);
   
   
   
View Full Code Here

    // 根据指定id查询出任务的TO 不能做改变操作
    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);

    if (taskInstanceQuery == null) {
      throw new FixFlowBizException("未查询到指定的任务");
    }

    String processInstanceId = taskInstanceQuery.getProcessInstanceId();

    String tokenId = taskInstanceQuery.getTokenId();
View Full Code Here

        mailUtil.setSmtpHost(mailInfoObj.getSmtpHost(), StringUtil.getInt(mailInfoObj.getSmtpPort()));
        mailUtil.setSmtpAuthentication(mailInfoObj.getUserName(), mailInfoObj.getPassWord());
        // 支持发送多人邮件 #4185
        String to = fixMailTo.getMailTo();
        if (to == null || to.equals("")) {
          throw new FixFlowBizException("mailTo is null");
        }
        String[] str = to.split(",");
        List<String> userMailToList=new ArrayList<String>();
        for (String userMail : str) {
         
          if(userMail==null||userMail.equals("")||userMail.trim().equals("")){
           
          }
          else{
            userMailToList.add(userMail);
          }
         
         
         
         
        }
       
        if(userMailToList.size()==0){
          throw new FixFlowBizException("Mail toaddress is null");
        }
        String[] userMailToFinStrings=(String[])userMailToList.toArray(new String[userMailToList.size()]);
       
       
        mailUtil.setTo(userMailToFinStrings);
       
       
       
       
       
        String cc = fixMailTo.getMailCc();
        if (cc != null && !cc.equals("")) {
          String[] strCC = cc.split(",");
         
          List<String> userMailCCList=new ArrayList<String>();
          for (String userMail : strCC) {
           
            if(userMail==null||userMail.equals("")||userMail.trim().equals("")){
             
            }
            else{
              userMailCCList.add(userMail);
            }
           
          }
         
          if(userMailCCList.size()==0){
            throw new FixFlowBizException("Mail ccaddress is null");
          }
         
          String[] userMailCCFinStrings=(String[])userMailCCList.toArray(new String[userMailCCList.size()]);
     
         
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.exception.FixFlowBizException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.