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