review: 代码审查

This commit is contained in:
lizhixian 2025-02-19 15:02:04 +08:00
parent 29a902f37e
commit 642e72ae7a
2 changed files with 3 additions and 0 deletions

View File

@ -808,6 +808,7 @@ public class BpmnModelUtils {
// 查找满足条件的 SequenceFlow 路径 // 查找满足条件的 SequenceFlow 路径
Gateway gateway = (Gateway) currentElement; Gateway gateway = (Gateway) currentElement;
Collection<SequenceFlow> matchSequenceFlows; Collection<SequenceFlow> matchSequenceFlows;
// 流程首次发起时variables值一定为空会导致条件表达式解析错误导致预测节点缺失
if (null == variables){ if (null == variables){
matchSequenceFlows = CollUtil.filterNew(gateway.getOutgoingFlows(), matchSequenceFlows = CollUtil.filterNew(gateway.getOutgoingFlows(),
flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId())); flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId()));

View File

@ -809,6 +809,7 @@ public class SimpleModelUtils {
if (nodeType == BpmSimpleModelNodeTypeEnum.CONDITION_BRANCH_NODE) { if (nodeType == BpmSimpleModelNodeTypeEnum.CONDITION_BRANCH_NODE) {
// 查找满足条件的 BpmSimpleModelNodeVO 节点 // 查找满足条件的 BpmSimpleModelNodeVO 节点
BpmSimpleModelNodeVO matchConditionNode; BpmSimpleModelNodeVO matchConditionNode;
// 流程首次发起时variables值一定为空会导致条件表达式解析错误导致预测节点缺失
if(null == variables) { if(null == variables) {
matchConditionNode = CollUtil.findOne(currentNode.getConditionNodes(), matchConditionNode = CollUtil.findOne(currentNode.getConditionNodes(),
conditionNode -> !BooleanUtil.isTrue(conditionNode.getConditionSetting().getDefaultFlow())); conditionNode -> !BooleanUtil.isTrue(conditionNode.getConditionSetting().getDefaultFlow()));
@ -830,6 +831,7 @@ public class SimpleModelUtils {
if (nodeType == BpmSimpleModelNodeTypeEnum.INCLUSIVE_BRANCH_NODE) { if (nodeType == BpmSimpleModelNodeTypeEnum.INCLUSIVE_BRANCH_NODE) {
// 查找满足条件的 BpmSimpleModelNodeVO 节点 // 查找满足条件的 BpmSimpleModelNodeVO 节点
Collection<BpmSimpleModelNodeVO> matchConditionNodes; Collection<BpmSimpleModelNodeVO> matchConditionNodes;
// 流程首次发起时variables值一定为空会导致条件表达式解析错误导致预测节点缺失
if (null == variables) { if (null == variables) {
matchConditionNodes = CollUtil.filterNew(currentNode.getConditionNodes(), matchConditionNodes = CollUtil.filterNew(currentNode.getConditionNodes(),
conditionNode -> !BooleanUtil.isTrue(conditionNode.getConditionSetting().getDefaultFlow())); conditionNode -> !BooleanUtil.isTrue(conditionNode.getConditionSetting().getDefaultFlow()));