fix(bpm):解决多实例任务根据'审批人自选'策略多次选择时,审批人被后一次选择覆盖的问题
This commit is contained in:
parent
0f50e722e2
commit
72c8ac3817
|
@ -647,6 +647,13 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||||
if (approveUserSelectAssignees == null) {
|
if (approveUserSelectAssignees == null) {
|
||||||
approveUserSelectAssignees = new HashMap<>();
|
approveUserSelectAssignees = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
// 当多实例任务根据'审批人自选'策略多次选择时,避免审批人被后一次选择覆盖
|
||||||
|
List<Long> nodeHadAssignees = approveUserSelectAssignees.get(nextFlowNode.getId());
|
||||||
|
if (nodeHadAssignees != null){
|
||||||
|
assignees = Stream.concat(nodeHadAssignees.stream(), assignees.stream())
|
||||||
|
.distinct()
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
approveUserSelectAssignees.put(nextFlowNode.getId(), assignees);
|
approveUserSelectAssignees.put(nextFlowNode.getId(), assignees);
|
||||||
Map<String,List<Long>> existingApproveUserSelectAssignees = (Map<String,List<Long>>) variables.get(
|
Map<String,List<Long>> existingApproveUserSelectAssignees = (Map<String,List<Long>>) variables.get(
|
||||||
BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES);
|
BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES);
|
||||||
|
|
Loading…
Reference in New Issue