update(bpm): 发起流程实例时不再校验发起人自选审批人

pull/174/head
fengjiajie 2025-03-12 00:17:43 +08:00
parent 1a01b0eec1
commit a09c700eb9
1 changed files with 9 additions and 2 deletions

View File

@ -51,10 +51,14 @@ public class BpmTaskCandidateStartUserSelectStrategy extends AbstractBpmTaskCand
ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId());
Assert.notNull(processInstance, "流程实例({})不能为空", execution.getProcessInstanceId());
Map<String, List<Long>> startUserSelectAssignees = FlowableUtils.getStartUserSelectAssignees(processInstance);
Assert.notNull(startUserSelectAssignees, "流程实例({}) 的发起人自选审批人不能为空",
execution.getProcessInstanceId());
if (startUserSelectAssignees == null) {
return Sets.newLinkedHashSet();
}
// 获得审批人
List<Long> 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<Long> assignees = startUserSelectAssignees.get(activityId);
if (CollUtil.isEmpty(assignees)){
return Sets.newLinkedHashSet();
}
return new LinkedHashSet<>(assignees);
}