Package com.exedosoft.wf.wfi

Examples of com.exedosoft.wf.wfi.ProcessInstance


    DOFormModel aFm = (DOFormModel) doimodel;
    BOInstance bi = aFm.getData();
    if (bi != null && bi.getValue("contextPiUid") != null) {

      ProcessInstance pi = ProcessInstance.getProcessInstance(bi
          .getValue("contextPiUid"));
      if(pi==null){
        pi = ProcessInstance.getHisProcessInstance(bi.getValue("contextPiUid"));
      }
     
      if (pi!=null && pi.getProcessTemplate() != null
          && pi.getProcessTemplate().getDoBO() != null
          && pi.getProcessTemplate().getDoBO().getMainPaneModel() != null) {
        String instanceUid = bi.getValue("instance_uid");
        if(instanceUid!=null){
          data.put("busiBOName", pi.getProcessTemplate().getDoBO().getName());
          data.put("instance_uid", instanceUid);
        }
        data.put("paneModel", pi.getProcessTemplate().getDoBO()
            .getMainPaneModel());
      }
    } else if (aFm.getLinkPaneModel() != null) {
      data.put("paneModel", aFm.getLinkPaneModel());
    }
View Full Code Here


    DOFormModel aFm = (DOFormModel) doimodel;
    BOInstance bi = aFm.getData();
    if (bi != null && bi.getValue("contextPiUid") != null) {

      ProcessInstance pi = ProcessInstance.getProcessInstance(bi
          .getValue("contextPiUid"));
      if (pi!=null && pi.getProcessTemplate() != null
          && pi.getProcessTemplate().getDoBO() != null) {
        String instanceUid = bi.getValue("instance_uid");
        if(instanceUid!=null){
          data.put("busiBOName", pi.getProcessTemplate().getDoBO().getName());
          data.put("instance_uid", instanceUid);
        }
      }
      NodeInstance ni = NodeInstance.getNodeInstanceByID(bi.getValue("contextNiUid"));
      if(ni!=null && ni.getNode().getPane()!=null){
View Full Code Here

    DOBO ptNI = DOBO.getDOBOByName("do_wfi_processinstance");
    BOInstance curPt = ptNI.getCorrInstance();
    BOInstance echo = new BOInstance();

    ProcessInstance pi = ProcessInstance.getProcessInstance(curPt.getUid());

    if (curPt == null || pi == null) {
      this.setEchoValue(I18n.instance().get("不存在工作流实例!"));
      return NO_FORWARD;
    }

    List<NodeInstance> nis = pi.retrieveNodeInstances();
    Map<String, NodeInstance> nodeIMap = new HashMap<String, NodeInstance>();
    for (Iterator<NodeInstance> it = nis.iterator(); it.hasNext();) {
      NodeInstance ni = it.next();
      if (nodeIMap.get(ni.getNode().getObjUid()) == null) {
        nodeIMap.put(ni.getNode().getObjUid(), ni);
      } else if (ni.getExeStatus().intValue() == NodeInstance.STATUS_FINISH) {
        nodeIMap.put(ni.getNode().getObjUid(), ni);
      }
    }

    ProcessTemplate pt = pi.getProcessTemplate();

    StringBuilder xml = new StringBuilder("<wf>  <processtemplate name='")
        .append(pt.getPtName()).append("'>");
    StringBuilder strNodeList = new StringBuilder("<nodes>");
    StringBuilder strFlowList = new StringBuilder("<transitions>");
View Full Code Here

      return null;
    }
   
    WFEngine  engine = WFEngineFactory.getWFEngine();
   
    ProcessInstance pi = null;
    try {
      pi = engine.loadProcessInstance(ptPI.getCorrInstance().getUid());
    } catch (WFException e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
   
    WFUtil.refreshWFPara(pi);
    try {
      this.service.invokeUpdate();
    } catch (ExedoException e1) {
      e1.printStackTrace();
      this.setEchoValue(e1.getLocalizedMessage());
      return NO_FORWARD;
    }

    try {
      pi.killProcessInstance();
    } catch (WFException e) {
      this.setEchoValue(e.getLocalizedMessage());
      return NO_FORWARD;
    }
    return DEFAULT_FORWARD;
View Full Code Here

      return null;
    }
   
    WFEngine  engine = WFEngineFactory.getWFEngine();
   
    ProcessInstance pi = null;
    try {
      pi = engine.loadProcessInstance(ptPI.getCorrInstance().getUid());
    } catch (WFException e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
   
    WFUtil.refreshWFPara(pi);
    try {
      this.service.invokeUpdate();
    } catch (ExedoException e1) {
      e1.printStackTrace();
      this.setEchoValue(e1.getLocalizedMessage());
      return NO_FORWARD;
    }

    try {
      pi.getFirstActivityNode().perform();
    } catch (WFException e) {
      this.setEchoValue(e.getLocalizedMessage());
      return NO_FORWARD;
    }
    return DEFAULT_FORWARD;
View Full Code Here

    // TODO Auto-generated method stub
   
    BOInstance para = DOGlobals.getInstance().getRuleContext().getInstance();
    if(para.getValue("corr_nodeinstance")!=null){
      NodeInstance ni = (NodeInstance)para.getObjectValue("corr_nodeinstance");
      ProcessInstance pi = ni.getProcessInstance();
     
      ///看提交人
      NodeInstance preConflict = ni.getNodeInstanceByPTNodeID(pi.getObjUid(), "tt2_n16", "" + NodeInstance.STATUS_FINISH);
     
      if(preConflict!=null){
        NodeInstance.storePersionAuth(ni.getObjUid(), preConflict.getPerformer());
      }
     
View Full Code Here

        e.printStackTrace();
        this.setEchoValue(e.getLocalizedMessage());
        return NO_FORWARD;
      }
    } else {
      ProcessInstance pi = null;
      try {
        pi = wfi.loadProcessInstance(wfUid);
        NodeInstance ni = pi.getFirstActivityNode();
        ni.perform();
      } catch (WFException e) {
        e.printStackTrace();
        this.setEchoValue(e.getLocalizedMessage());
        return NO_FORWARD;
View Full Code Here

      wfUid = bi.getValue("wf_id");
    }
    WFEngine wfi = WFEngineFactory.getWFEngine();
    if(wfUid != null){
   
      ProcessInstance pi = null;
      try {
        pi = wfi.loadProcessInstance(wfUid);
        pi.withDrawStartNode();
      } catch (WFException e) {
        e.printStackTrace();
        this.setEchoValue(e.getLocalizedMessage());
        return NO_FORWARD;
      }
View Full Code Here

TOP

Related Classes of com.exedosoft.wf.wfi.ProcessInstance

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.