Commit 3d20ce1a9bdc56bdec2b55a98bb1c15ff76735d7
1 parent
045a224c
fix: 修复流程分支节点预测问题
Showing
1 changed file
with
2 additions
and
1 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/BpmnModelUtils.java
| @@ -780,7 +780,8 @@ public class BpmnModelUtils { | @@ -780,7 +780,8 @@ public class BpmnModelUtils { | ||
| 780 | Gateway gateway = (Gateway) currentElement; | 780 | Gateway gateway = (Gateway) currentElement; |
| 781 | SequenceFlow matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(), | 781 | SequenceFlow matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(), |
| 782 | flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId()) | 782 | flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId()) |
| 783 | - && evalConditionExpress(variables, flow.getConditionExpression())); | 783 | + //流程第一次发起时,variables条件值一定为空,发生异常会导致后续分支节点无法预测, |
| 784 | + || (null != variables && evalConditionExpress(variables, flow.getConditionExpression()))); | ||
| 784 | if (matchSequenceFlow == null) { | 785 | if (matchSequenceFlow == null) { |
| 785 | matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(), | 786 | matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(), |
| 786 | flow -> ObjUtil.equal(gateway.getDefaultFlow(), flow.getId())); | 787 | flow -> ObjUtil.equal(gateway.getDefaultFlow(), flow.getId())); |