Commit 3d20ce1a9bdc56bdec2b55a98bb1c15ff76735d7

Authored by lizhixian
1 parent 045a224c

fix: 修复流程分支节点预测问题

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 780 Gateway gateway = (Gateway) currentElement;
781 781 SequenceFlow matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(),
782 782 flow -> ObjUtil.notEqual(gateway.getDefaultFlow(), flow.getId())
783   - && evalConditionExpress(variables, flow.getConditionExpression()));
  783 + //流程第一次发起时,variables条件值一定为空,发生异常会导致后续分支节点无法预测,
  784 + || (null != variables && evalConditionExpress(variables, flow.getConditionExpression())));
784 785 if (matchSequenceFlow == null) {
785 786 matchSequenceFlow = CollUtil.findOne(gateway.getOutgoingFlows(),
786 787 flow -> ObjUtil.equal(gateway.getDefaultFlow(), flow.getId()));
... ...