新增判断是否为路由节点方法

This commit is contained in:
hubin 2024-12-06 20:17:33 +08:00
parent 0b2832d8f7
commit 8490cc470f
2 changed files with 10 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public class ModelHelper {
*/
public static NodeModel findNextNode(NodeModel nodeModel, List<String> currentTask) {
NodeModel parentNode = nodeModel.getParentNode();
if (null == parentNode || Objects.equals(0, parentNode.getType())) {
if (null == parentNode || TaskType.major.eq(parentNode.getType())) {
// 递归至发起节点流程结束
return null;
}

View File

@ -503,6 +503,15 @@ public class NodeModel implements ModelInstance, Serializable {
return TaskType.inclusiveBranch.eq(type);
}
/**
* 判断是否为路由节点
*
* @return true false
*/
public boolean routeNode() {
return TaskType.routeBranch.eq(type);
}
/**
* 参与者类型 0用户 1角色 2部门
*/