.append(pt.getPtName()).append("'>");
StringBuilder strNodeList = new StringBuilder("<nodes>");
StringBuilder strFlowList = new StringBuilder("<transitions>");
for (Iterator<PTNode> it = pt.retrieveNodes().iterator(); it.hasNext();) {
PTNode aNode = it.next();
String autoServiceName = "";
String deciType = "";
String authType = "";
if (aNode.getAutoExcutesService() != null) {
autoServiceName = aNode.getAutoExcutesService().getName();
}
if (aNode.getDecisionType() != null) {
deciType = aNode.getDecisionType().toString();
}
if (aNode.getAuthType() != null) {
authType = aNode.getAuthType().toString();
}
String paneName = "";
if (aNode.getPane() != null) {
paneName = aNode.getPane().getName();
}
String nodeName = aNode.getNodeName();
NodeInstance nodeI = nodeIMap.get(aNode.getObjUid());
if (nodeI != null && nodeI.getPerformer() != null) {
String name = null;
try {
BOInstance user = OrgParter.getDefaultEmployee().getDoBO()
.getInstance(nodeI.getPerformer());
if (user != null) {
name = user.getName();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (name != null) {
nodeName = nodeName + "(操作人:" + name + ")";
}
}
//当流程是下一步执行人可选时,当前节点操作人若为上一步操作人所选择的,
//则在当前节点显示当前节点的操作人.--by stone
else if (nodeI != null && nodeI.getPerformer() == null) {
String name = null;
String nodeUUid = null;
String nextUserId = null;
nodeUUid = nodeI.getObjUid();
if (nodeUUid != null) {
List nextUserList = DOAuthorization.getAuthConfigOfWhat(""
+ DOAuthorization.WHAT_WF_NODEINSTANCE, nodeUUid);
if (nextUserList.size() > 0) {
DOAuthorization nextuserDO = (DOAuthorization) nextUserList
.iterator().next();
if (nextuserDO != null) {
nextUserId = nextuserDO.getOuUid();
}
if (nextUserId != null) {
BOInstance ouUser = OrgParter.getDefaultEmployee()
.getDoBO().getInstance(nextUserId);
if (ouUser != null) {
name = ouUser.getName();
}
}
}
}
if (name != null) {
nodeName = nodeName + "(操作人:" + name + ")";
}
}
String status = "init";
if (nodeI != null && nodeI.getExeStatus() != null) {
switch (nodeI.getExeStatus().intValue()) {
case NodeInstance.STATUS_RUN:
status = "run";
break;
case NodeInstance.STATUS_FINISH:
status = "finish";
break;
}
;
}
String aNodeStr = "<node id='" + aNode.getObjUid() + "' nodeType='"
+ aNode.getNodeTypeStr() + "' nodeName='" + nodeName
+ "' nodeStateShow='"
+ getDefault(aNode.getNodeStateShow())
+ "' nodeStateShowBack='"
+ getDefault(aNode.getNodeStateShowBack())
+ "' accessClass='" + getDefault(aNode.getAccessClass())
+ "' specName='" + getDefault(aNode.getSpecName())
+ "' passTxt='" + getDefault(aNode.getPassTxt())
+ "' rejectTxt='" + getDefault(aNode.getRejectTxt())
+ "' autoService='" + autoServiceName + "' authType='"
+ authType + "' paneName='" + paneName + "' subflow='"
+ getDefault(aNode.getNodeExt1())
+ "' decisionExpression='"
+ getDefault(aNode.getDecisionExpression())
+ "' decisionType='" + deciType + "' status='" + status
+ "' nodeDesc='" + getDefault(aNode.getNodeDesc())
+ "' x='" + aNode.getX() + "' y='" + aNode.getY() + "'/>\n";
strNodeList.append(aNodeStr);
List postNodes = aNode.getPostNodeDepes();
if (postNodes != null && postNodes.size() > 0) {
for (Iterator<NodeDenpendency> itd = postNodes.iterator(); itd
.hasNext();) {
NodeDenpendency nd = itd.next();