diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/dept/BpmTaskCandidateStartUserSelectStrategy.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/dept/BpmTaskCandidateStartUserSelectStrategy.java index 9fd14d6de..11cd53017 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/dept/BpmTaskCandidateStartUserSelectStrategy.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/dept/BpmTaskCandidateStartUserSelectStrategy.java @@ -51,10 +51,14 @@ public class BpmTaskCandidateStartUserSelectStrategy extends AbstractBpmTaskCand ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId()); Assert.notNull(processInstance, "流程实例({})不能为空", execution.getProcessInstanceId()); Map> startUserSelectAssignees = FlowableUtils.getStartUserSelectAssignees(processInstance); - Assert.notNull(startUserSelectAssignees, "流程实例({}) 的发起人自选审批人不能为空", - execution.getProcessInstanceId()); + if (startUserSelectAssignees == null) { + return Sets.newLinkedHashSet(); + } // 获得审批人 List assignees = startUserSelectAssignees.get(execution.getCurrentActivityId()); + if (CollUtil.isEmpty(assignees)){ + return Sets.newLinkedHashSet(); + } return new LinkedHashSet<>(assignees); } @@ -70,6 +74,9 @@ public class BpmTaskCandidateStartUserSelectStrategy extends AbstractBpmTaskCand } // 获得审批人 List assignees = startUserSelectAssignees.get(activityId); + if (CollUtil.isEmpty(assignees)){ + return Sets.newLinkedHashSet(); + } return new LinkedHashSet<>(assignees); }