瀏覽代碼

review: 51行

smallNorthLee 5 月之前
父節點
當前提交
dadd43677e

+ 5 - 0
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/dept/BpmTaskCandidateApproveUserSelectStrategy.java

@@ -50,6 +50,9 @@ public class BpmTaskCandidateApproveUserSelectStrategy extends AbstractBpmTaskCa
         Map<String, List<Long>> approveUserSelectAssignees = FlowableUtils.getApproveUserSelectAssignees(processInstance);
         Assert.notNull(approveUserSelectAssignees, "流程实例({}) 的下一个执行节点审批人不能为空",
                 execution.getProcessInstanceId());
+        if (approveUserSelectAssignees == null) {
+            return Sets.newLinkedHashSet();
+        }
         // 获得审批人
         List<Long> assignees = approveUserSelectAssignees.get(execution.getCurrentActivityId());
         return CollUtil.isNotEmpty(assignees) ? new LinkedHashSet<>(assignees) : Sets.newLinkedHashSet();
@@ -62,6 +65,8 @@ public class BpmTaskCandidateApproveUserSelectStrategy extends AbstractBpmTaskCa
             return Sets.newLinkedHashSet();
         }
         Map<String, List<Long>> approveUserSelectAssignees = FlowableUtils.getApproveUserSelectAssignees(processVariables);
+        Assert.notNull(approveUserSelectAssignees, "流程实例节点({}) 的下一个执行节点审批人不能为空",
+                activityId);
         if (approveUserSelectAssignees == null) {
             return Sets.newLinkedHashSet();
         }