Commit 39ee47d9d2814e04ef04fb04ca9e27f44e9db606

Authored by Lesan
Committed by Gitee
1 parent 26a1d636

fix: 当无满足条件时选择默认路线

yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java
@@ -720,7 +720,7 @@ public class BpmnModelUtils { @@ -720,7 +720,7 @@ public class BpmnModelUtils {
720 && evalConditionExpress(variables, flow.getConditionExpression())); 720 && evalConditionExpress(variables, flow.getConditionExpression()));
721 if (matchSequenceFlow == null) { 721 if (matchSequenceFlow == null) {
722 matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(), 722 matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(),
723 - flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId())); 723 + flow -> ObjUtil.equal(gateway.getDefaultFlow(), flow.getId()));
724 // 特殊:没有默认的情况下,并且只有 1 个条件,则认为它是默认的 724 // 特殊:没有默认的情况下,并且只有 1 个条件,则认为它是默认的
725 if (matchSequenceFlow == null && gateway.getOutgoingFlows().size() == 1) { 725 if (matchSequenceFlow == null && gateway.getOutgoingFlows().size() == 1) {
726 matchSequenceFlow = gateway.getOutgoingFlows().get(0); 726 matchSequenceFlow = gateway.getOutgoingFlows().get(0);
@@ -742,7 +742,7 @@ public class BpmnModelUtils { @@ -742,7 +742,7 @@ public class BpmnModelUtils {
742 && evalConditionExpress(variables, flow.getConditionExpression())); 742 && evalConditionExpress(variables, flow.getConditionExpression()));
743 if (CollUtil.isEmpty(matchSequenceFlows)) { 743 if (CollUtil.isEmpty(matchSequenceFlows)) {
744 matchSequenceFlows = CollUtil.filterNew(gateway.getOutgoingFlows(), 744 matchSequenceFlows = CollUtil.filterNew(gateway.getOutgoingFlows(),
745 - flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId())); 745 + flow -> ObjUtil.equal(gateway.getDefaultFlow(), flow.getId()));
746 // 特殊:没有默认的情况下,并且只有 1 个条件,则认为它是默认的 746 // 特殊:没有默认的情况下,并且只有 1 个条件,则认为它是默认的
747 if (CollUtil.isEmpty(matchSequenceFlows) && gateway.getOutgoingFlows().size() == 1) { 747 if (CollUtil.isEmpty(matchSequenceFlows) && gateway.getOutgoingFlows().size() == 1) {
748 matchSequenceFlows = gateway.getOutgoingFlows(); 748 matchSequenceFlows = gateway.getOutgoingFlows();