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>");