新增模型结束节点判断处理逻辑
This commit is contained in:
parent
6d0ca7cb67
commit
fc303167d5
@ -84,7 +84,7 @@ public class ModelHelper {
|
||||
// 获取路由分支子节点
|
||||
nextNodes.addAll(getNextChildNodes(flowLongContext, execution, rootNodeModel, childNode.getChildNode()));
|
||||
}
|
||||
} else {
|
||||
} else if (!TaskType.end.eq(childNode.getType())) {
|
||||
// 普通节点
|
||||
nextNodes.add(childNode);
|
||||
}
|
||||
|
@ -438,6 +438,9 @@ public class NodeModel implements ModelInstance, Serializable {
|
||||
if (null == nextNode) {
|
||||
// 如果当前节点完成,并且该节点为条件节点,找到主干执行节点继续执行
|
||||
nextNode = ModelHelper.findNextNode(this, currentTask);
|
||||
} else if(TaskType.end.eq(nextNode.getType())) {
|
||||
// 执行到结束节点
|
||||
nextNode = null;
|
||||
}
|
||||
return Optional.ofNullable(nextNode);
|
||||
}
|
||||
|
@ -51,6 +51,9 @@ public class TestNextChildNodes extends TestModel {
|
||||
}});
|
||||
|
||||
assertEquals("flk1733658019276", "flk1733658095760", processModel);
|
||||
|
||||
// 结束
|
||||
assertConsumer("flk1733658019276", processModel, null, nodeModels -> Assertions.assertTrue(nodeModels.isEmpty()));
|
||||
}
|
||||
|
||||
private void assertEquals(String nextNodeKey, String nodeKey, ProcessModel processModel) {
|
||||
|
@ -367,7 +367,12 @@
|
||||
"allowAppendNode": false,
|
||||
"allowRollback": false,
|
||||
"rejectStrategy": 2,
|
||||
"rejectStart": 1
|
||||
"rejectStart": 1,
|
||||
"childNode": {
|
||||
"nodeName": "结束",
|
||||
"nodeKey": "flk1733380933011",
|
||||
"type": -1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user