Examples of PTNode


Examples of com.exedosoft.wf.pt.PTNode

        pi.setExeStatus(Integer.valueOf(ProcessInstance.STATUS_RUN));
      }

      DAOUtil.BUSI().store(pi); // /////保存工作流实例

      PTNode startNode = pt.getStartNode();
      niStart = NodeInstance.initNodeInstance(pi, startNode,
          NodeInstance.STATUS_FREE);
      DAOUtil.BUSI().store(niStart);

      // // /////////如果模板存在节点
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

   * @throws ExedoException
   * @throws DAOException
   */
  private PTNode copyToNodeInstances(ProcessInstance pi, HashMap map)
      throws ExedoException {
    PTNode start = null;
    for (Iterator it = pi.getProcessTemplate().retrieveNodes().iterator(); it
        .hasNext();) {

      PTNode node = (PTNode) it.next();
      NodeInstance ni = NodeInstance.initNodeInstance(pi, node,
          NodeInstance.STATUS_FREE);
      // //////找到开始节点
      if (node.getNodeType() != null
          && node.getNodeType().intValue() == PTNode.TYPE_START) {
        start = node;
      }
      DAOUtil.BUSI().store(ni);

      map.put(node, ni);
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

   *
   * @return
   */
  private List initPostNodeDepes() {

    PTNode tNode = this.getNode();

    /**
     * 如果是自定义路由节点,(包括自连接)
     *
     * SELF的场景有两个:
     *
     * 1, 存在两个节点:第一个节点可以自由指定多个人进行会签,这个节点的类型为self
     * ,后续的节点为activity。self节点觉得生成多少个人的 会签节点,注意,每个节点的授权给具体的一个人。
     * 2,一个节点的自连接,这个节点需要自动条件路由,特别是部门内的路由,可以向上找签署人
     *
     */
    if (this.getNodeType() != null
        && this.getNodeType().intValue() == PTNode.TYPE_SELF) {

      WFJudge wfa = null;
      try {

        Class caClass = Class.forName(tNode.getDecisionExpression());
        wfa = (WFJudge) caClass.newInstance();
        wfa.doJudge(this);

      } catch (ClassNotFoundException ex) {
        log.error(ex.getMessage());
      } catch (Exception ex1) {
        log.error(ex1);
      }

      List nextNodeDepes = this.getPostNodeDepes();
      if (nextNodeDepes != null && nextNodeDepes.size() > 0) {
        return nextNodeDepes;
      }

      // OrgParter userParter = OrgParter.getDefaultEmployee();
      // DOBO userBO = userParter.getDoBO();
      // BOInstance bi = userBO.getInstance(this.getPerformer());
      // String deptUid = bi.getValue("unit_uid");
      // if (!"11".equals(deptUid)) {
      // List llist = new ArrayList();
      // // WFDAO daoself = new WFDAO();
      //
      // //
      // // daoself.setAutoClose(false);
      //
      // NodeInstance niPost = NodeInstance.initNodeInstance(this
      // .getProcessInstance(), tNode, NodeInstance.STATUS_FREE);
      // NIDependency nid = new NIDependency();
      // try {
      // DAOUtil.BUSI().store(niPost);
      //
      // nid.setPreNodeInstance(this);
      // nid.setPostNodeInstance(niPost);
      // DAOUtil.BUSI().store(nid);
      // } catch (Exception e) {
      // // TODO Auto-generated catch block
      // e.printStackTrace();
      // } finally {
      // // daoself.closeSession();
      // }
      // llist.add(nid);
      // return llist;
      //
      // }
    }
    // ////////////如果子连接执行完才执行下面的.

    List list = new ArrayList();
    // WFDAO dao = new WFDAO();
    // dao.setAutoClose(false);
    try {
      for (Iterator it = tNode.getPostNodeDepes().iterator(); it
          .hasNext();) {

        NodeDenpendency nd = (NodeDenpendency) it.next();
        NodeInstance niPost = NodeInstance.initNodeInstance(
            this.getProcessInstance(), nd.getPostNode(),
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

    // }
    // /普通人工活动节点的前后,只有有一个节点。decition后面可以有多个,conjunction前面可以有多个。

    List prePTNodes = this.getNode().getPreNodes();

    PTNode preNode = (PTNode) prePTNodes.get(0);
    NodeInstance theNewBackNI = null;
    if (preNode.getNodeType() != null
        && preNode.getNodeType().intValue() == PTNode.TYPE_START) {
      throw new WFException("前面已经没有节点,无法回退!");
    }
    // PTNode.TYPE_SELF////////////这种情况单独考虑.

    if (preNode.getNodeType() != null
        && preNode.getNodeType().intValue() != PTNode.TYPE_ACTIVITY) {
      prePTNodes = preNode.getPreNodes();
    }

    String backStr = null;
    // WFDAO dao = new WFDAO();
    // dao.setAutoClose(false);
    try {

      for (Iterator it = prePTNodes.iterator(); it.hasNext();) {
        PTNode aPre = (PTNode) it.next();
        // ///////////处理回退
        theNewBackNI = buildNewRelation(aPre, null, type);
        // ////////////////处理回退
      }
      backStr = this.getNode().getNodeStateShowBack();
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

    if (backType != -1) {
      SessionContext us = DOGlobals.getInstance().getSessoinContext();
      BOInstance formI = us.getFormInstance();
      String rTxt = "";
      PTNode node = this.getNode();
      if (formI != null && node != null) {
        if (node.getRejectTxt() != null
            && !"".equals(node.getRejectTxt().trim())) {
          rTxt = formI.getValue(node.getRejectTxt());
        } else if (formI.getValue("reject_txt") != null) {
          rTxt = formI.getValue("reject_txt");
        } else if (formI.getValue("rejecttxt") != null) {
          rTxt = formI.getValue("rejecttxt");
        }
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

  }

  public NodeInstance forward(String nodeUid, String forwardReason,
      String scheduleOUUid, int forwardType) throws WFException {

    PTNode aNode = PTNode.getNodeById(nodeUid);
    NodeInstance newInstance = null;
    try {
      newInstance = buildNewRelation(aNode, scheduleOUUid, forwardType);
      storeNextNodeAuthorization(newInstance);
      setExeStatus(Integer.valueOf(STATUS_FINISH));
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

  }

  private void dealPropetyValues(BOInstance formI) {

    PTNode node = this.getNode();
    if (node != null) {

      if (node.getPassTxt() != null
          && !"".equals(node.getPassTxt().trim())) {
        this.setPassTxt(formI.getValue(node.getPassTxt()));
      }

      if (node.getRejectTxt() != null
          && !"".equals(node.getRejectTxt().trim())) {
        this.setRejectTxt(formI.getValue(node.getRejectTxt()));
      } else if (formI.getValue("reject_txt") != null) {
        this.setRejectTxt(formI.getValue("reject_txt"));
      } else if (formI.getValue("rejecttxt") != null) {
        this.setRejectTxt(formI.getValue("rejecttxt"));
      }

      if (node.getNodeExt1() != null
          && !"".equals(node.getNodeExt1().trim())) {
        this.setNodeExt1(formI.getValue(node.getNodeExt1()));
      }

      if (node.getNodeExt2() != null
          && !"".equals(node.getNodeExt2().trim())) {
        this.setNodeExt2(formI.getValue(node.getNodeExt2()));
      }
      if (node.getRetNodeUID() != null
          && !"".equals(node.getRetNodeUID().trim())) {
        this.setRetNodeUID(formI.getValue(node.getRetNodeUID()));
      }

    }

  }
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

  }

  private String getNodeDecision() {

    PTNode tNode = this.getNode();

    if (tNode.getDecisionType() != null
        && tNode.getDecisionType().intValue() == PTNode.DECISION_TYPE_JAVA) {

      String decisionExpression = tNode.getDecisionExpression();

      if (decisionExpression != null
          && !"".equals(decisionExpression.trim())) {
        WFJudge wfa = null;
        try {
          log.info("The Decision Expression::" + decisionExpression);

          Class caClass = Class.forName(decisionExpression);
          wfa = (WFJudge) caClass.newInstance();
          return wfa.doJudge(this);

        } catch (ClassNotFoundException ex) {
          log.error(ex.getMessage());
          return null;
        } catch (Exception ex1) {
          log.error(ex1);
          return null;
        }

      }
      return null;
    } else {
      return tNode.getDecisionExpression();
    }

  }
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

    // ////////////test
    log.info("表达式::::::::::::::::::::;");
    log.info(srcExp);
    String expression = srcExp.trim().toLowerCase();
    PTNode tNode = this.getNode();

    // //////////////////////////相对应业务对象
    BOInstance bi = tNode.getProcessTemplate().getDoBO()
        .getInstance(this.getProcessInstance().getInstanceUid());
    // //////////来自界面输入
    BOInstance formBI = DOGlobals.getInstance().getSessoinContext()
        .getFormInstance();
    if (bi == null && formBI == null) {
      log.info("判断表达式,无法得到执行判断参考值.");
      return srcExp;
    }

    Collection boProperties = tNode.getProcessTemplate().getDoBO()
        .retrieveProperties();
    // //this.getNodeDecision 可能是一个复杂的表达式,不仅仅是一个字段 可能是多个字段的加减乘除运算
    //
    expression = StringUtil.getCalException(expression, bi, boProperties,
        "0");
View Full Code Here

Examples of com.exedosoft.wf.pt.PTNode

    }
    return null;
  }

  private DOPaneModel getAPane(int paneType) {
    PTNode tNode = this.getNode();

    DOPaneModel aPane = tNode.getPane();
    switch (paneType) {
    case NodeInstance.PANE_DONE:
      aPane = tNode.getDonePane();
      break;
    case NodeInstance.PANE_RESULT:
      aPane = tNode.getResultPane();
      break;
    }
    return aPane;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.