//会签时,获取一条会签分支上面是否有用户可审核的节点 private string GetOneForkLineCanCheckNodeId(FlowNode fromForkStartNode, FlowRuntime wfruntime, Tag tag) { string canCheckId = ""; var node = fromForkStartNode; do //沿一条分支线路执行,直到遇到会签结束节点 { var makerList = GetNodeMakers(node); if (node.setInfo.Taged == null && !string.IsNullOrEmpty(makerList) && makerList.Split(',').Any(one => tag.UserId == one)) { canCheckId = node.id; break; } node = wfruntime.GetNextNode(node.id); } while (node.type != FlowNode.JOIN); return(canCheckId); }
//获取会签一条线上的审核者,该审核者应该是已审核过的节点的下一个人 private string GetOneForkLineMakers(FlowNode fromForkStartNode, FlowRuntime wfruntime) { string markers = ""; var node = fromForkStartNode; do //沿一条分支线路执行,直到遇到第一个没有审核的节点 { if (node.setInfo != null && node.setInfo.Taged != null) { if (node.type != FlowNode.FORK && node.setInfo.Taged != (int)TagState.Ok) //如果节点是不同意或驳回,则不用再找了 { break; } node = wfruntime.GetNextNode(node.id); //下一个节点 continue; } var marker = GetNodeMarkers(node); if (marker == "") { throw (new Exception($"节点{node.name}没有审核者,请检查!")); } if (marker == "1") { throw (new Exception($"节点{node.name}是会签节点,不能用所有人,请检查!")); } if (markers != "") { markers += ","; } markers += marker; break; } while (node.type != FlowNode.JOIN); return(markers); }
//獲取會簽一條線上的審核者,該審核者應該是已審核過的節點的下一個人 private string GetOneForkLineMakers(FlowNode fromForkStartNode, FlowRuntime wfruntime) { string markers = ""; var node = fromForkStartNode; do //沿一條分支線路執行,直到遇到第一個沒有審核的節點 { if (node.setInfo != null && node.setInfo.Taged != null) { if (node.type != FlowNode.FORK && node.setInfo.Taged != (int)TagState.Ok) //如果節點是不同意或駁回,則不用再找了 { break; } node = wfruntime.GetNextNode(node.id); //下一個節點 continue; } var marker = GetNodeMarkers(node); if (marker == "") { throw (new Exception($"節點{node.name}沒有審核者,請檢查!")); } if (marker == "1") { throw (new Exception($"節點{node.name}是會簽節點,不能用所有人,請檢查!")); } if (markers != "") { markers += ","; } markers += marker; break; } while (node.type != FlowNode.JOIN); return(markers); }