*
* @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(),