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

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


    ProcessDefinitionBehavior processDefinition = null;
    if (processDefinitionId != null) {
      processDefinition = processDefinitionManager.findLatestProcessDefinitionById(processDefinitionId);
      if (processDefinition == null) {
        throw new FixFlowException("通过 processDefinitionId 没有找到指定流程 = '" + processDefinitionId + "'");
      }
    } else if (processDefinitionKey != null) {
      processDefinition = processDefinitionManager.findLatestProcessDefinitionByKey(processDefinitionKey);
      if (processDefinition == null) {
        throw new FixFlowException("通过 processDefinitionKey 没有找到指定流程 '" + processDefinitionKey + "'");
      }
    } else {
      throw new FixFlowException("processDefinitionKey 和 processDefinitionId 不能都为空");
    }

    ProcessInstanceEntity processInstanceEntity = null;
    try {
      /*if(parentProcessInstance!=null){
       
        if(parentProcessInstanceToken!=null){
          processInstanceEntity=new ProcessInstanceEntity(processDefinition, businessKey, parentProcessInstance, (TokenEntity) parentProcessInstanceToken);
         
        }
        else{
          throw new FixFlowException("子流程启动失败");
        }
       
      }
      else{
        processInstanceEntity =  processDefinition.createProcessInstance(businessKey);

      }*/
      processInstanceEntity =  processDefinition.createProcessInstance(businessKey);
     
      processInstanceEntity.setStartAuthor(startAuthor);
      if(this.initiator!=null&&!this.initiator.equals("")){
        processInstanceEntity.setInitiatorWithoutCascade(this.initiator);
      }
      processInstanceEntity.getContextInstance().setTransientVariableMap(transientVariables);
      processInstanceEntity.getContextInstance().setVariableMap(variables);
 

      processInstanceEntity.noneStart();
     
     
      commandContext.getProcessInstanceManager().saveProcessInstance(processInstanceEntity);

    } catch (Exception e) {
      throw new FixFlowException("流程实例启动异常! "+ e.getMessage(), e);
    }

    return processInstanceEntity;
  }
View Full Code Here


    if(end != null){
      paraMap.put("END", end);
    }
   
    if(paraMap.keySet().size() == 0){
      throw new FixFlowException("归档参数异常,请检查");
    }
    return commandContext.getHistoryManager().archiveByPara(paraMap);
  }
View Full Code Here

      try {

        ExpressionMgmt.execute(taskCommand.getExpression(),
            executionContext);
      } catch (Exception e) {
        throw new FixFlowException("用户命令表达式执行异常!", e);
      }
    }

    List<TaskInstanceEntity> taskInstances = processInstanceImpl
        .getTaskMgmtInstance().getTaskInstanceEntitys();
View Full Code Here

    tokenEntity.signal();

    try {
      processInstanceManager.saveProcessInstance(processInstanceImpl);
    } catch (Exception e) {
      throw new FixFlowException("流程实例持久化失败!", e);
    }
    return null;
   
   
View Full Code Here

        break;
      }

    }
    if(groupDefinitionObj==null){
      throw new FixFlowException("编号为: "+groupId+" 类型为: "+groupType+" 的组不存在");
    }
   
    if(childMembers){
      return groupDefinitionObj.findUserChildMembersIncludeByGroupId(groupId);
    }
View Full Code Here

    TaskManager taskManager = commandContext.getTaskManager();

    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);
   
    if(taskId==null||taskId.equals("")){
      throw new FixFlowException("taskId不能为空");
    }

   
    if(taskInstanceQuery==null){
      throw new FixFlowException("没有查询到相关任务");
    }
   
    String tokenId = taskInstanceQuery.getTokenId();
    String processDefinitionId = taskInstanceQuery.getProcessDefinitionId();
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();
View Full Code Here

   
    Object obj = null;
    try {
      obj = Class.forName(compClass).newInstance();
    } catch (Exception e) {
      throw new FixFlowException("",e);
    }
    ISvgComponent comp = null;
    if(obj instanceof ISvgComponent)
      comp = (ISvgComponent)obj;
    else
      throw new FixFlowException(compClass+"没有继承自组件类ISvgComponent!");
   
    result = comp.createComponent(svgTo);
   
    return result;
  }
View Full Code Here

    try {
      InputStream in = SvgBench.class.getResourceAsStream(templetePath);
      doc = XmlUtil.read(in);
     
    } catch (DocumentException e) {
      throw new FixFlowException("",e);
    }
  }
View Full Code Here

        buffOS.write(word);
      }
      buffOS.flush();
      inputStreamNewFile = new FileInputStream(newFile);
    }catch(Exception ex){
      throw new FixFlowException(ExceptionCode.EXCEPTION_DEFAULT,ex);
    }finally{
      try {
        if(outputStream !=null)
          outputStream.close();
        if(buffOS != null)
          buffOS.close();
      } catch (IOException e) {
        // TODO Auto-generated catch block
        throw new FixFlowException(ExceptionCode.EXCEPTION_DEFAULT,e);
      }
    }
    URI uri = URI.createFileURI(path);
    Definitions definitions = getDefinitions("process_1",inputStreamNewFile);
    Process process =  (Process)definitions.getRootElements().get(0);
View Full Code Here

    documentRoot.setDefinitions(definitions);
    try {
      resource.save(null);
    } catch (IOException e) {
      e.printStackTrace();
      throw new FixFlowException(ExceptionCode.EXCEPTION_DEFAULT,e);
    }
  }
View Full Code Here

TOP

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

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.