Commit 642e72ae7abda7264e430cba9593c9e06aee3c28

Authored by lizhixian
1 parent 29a902f3

review: 代码审查

yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java
... ... @@ -808,6 +808,7 @@ public class BpmnModelUtils {
808 808 // 查找满足条件的 SequenceFlow 路径
809 809 Gateway gateway = (Gateway) currentElement;
810 810 Collection<SequenceFlow> matchSequenceFlows;
  811 + // 流程首次发起时,variables值一定为空,会导致条件表达式解析错误导致预测节点缺失
811 812 if (null == variables){
812 813 matchSequenceFlows = CollUtil.filterNew(gateway.getOutgoingFlows(),
813 814 flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId()));
... ...
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java
... ... @@ -809,6 +809,7 @@ public class SimpleModelUtils {
809 809 if (nodeType == BpmSimpleModelNodeTypeEnum.CONDITION_BRANCH_NODE) {
810 810 // 查找满足条件的 BpmSimpleModelNodeVO 节点
811 811 BpmSimpleModelNodeVO matchConditionNode;
  812 + // 流程首次发起时,variables值一定为空,会导致条件表达式解析错误导致预测节点缺失
812 813 if(null == variables) {
813 814 matchConditionNode = CollUtil.findOne(currentNode.getConditionNodes(),
814 815 conditionNode -> !BooleanUtil.isTrue(conditionNode.getConditionSetting().getDefaultFlow()));
... ... @@ -830,6 +831,7 @@ public class SimpleModelUtils {
830 831 if (nodeType == BpmSimpleModelNodeTypeEnum.INCLUSIVE_BRANCH_NODE) {
831 832 // 查找满足条件的 BpmSimpleModelNodeVO 节点
832 833 Collection<BpmSimpleModelNodeVO> matchConditionNodes;
  834 + // 流程首次发起时,variables值一定为空,会导致条件表达式解析错误导致预测节点缺失
833 835 if (null == variables) {
834 836 matchConditionNodes = CollUtil.filterNew(currentNode.getConditionNodes(),
835 837 conditionNode -> !BooleanUtil.isTrue(conditionNode.getConditionSetting().getDefaultFlow()));
... ...