|
@@ -110,7 +110,11 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
Gson gson = new Gson();
|
|
Gson gson = new Gson();
|
|
for (Map.Entry<String, CustomFlowVarDto> entry : agginessMap.entrySet()) {
|
|
for (Map.Entry<String, CustomFlowVarDto> entry : agginessMap.entrySet()) {
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(entry.getValue()), CustomFlowVarDto.class);
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(entry.getValue()), CustomFlowVarDto.class);
|
|
- varMap.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds().size() == 1 ? customFlowVarDto.getApproveIds().get(0) : customFlowVarDto.getApproveIds());
|
|
|
|
|
|
+ if (Objects.nonNull(customFlowVarDto.getFlowTaskVar()) && customFlowVarDto.getFlowTaskVar().contains(DefaultInstanceConvertToMultiInstance.DEFAULT_ASSIGNEE_LIST)) {
|
|
|
|
+ varMap.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds());
|
|
|
|
+ } else {
|
|
|
|
+ varMap.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds().get(0));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//启动流程
|
|
//启动流程
|
|
ProcessInstance processInstance = varMap.size() > 0 ? runtimeService.startProcessInstanceByKey(id, varMap) : runtimeService.startProcessInstanceByKey(id);
|
|
ProcessInstance processInstance = varMap.size() > 0 ? runtimeService.startProcessInstanceByKey(id, varMap) : runtimeService.startProcessInstanceByKey(id);
|
|
@@ -504,7 +508,11 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
Map<String, CustomFlowVarDto> agginessMap) {
|
|
Map<String, CustomFlowVarDto> agginessMap) {
|
|
if (Objects.nonNull(agginessMap.get(nextFlowTaskResult.getTaskKey()))) {
|
|
if (Objects.nonNull(agginessMap.get(nextFlowTaskResult.getTaskKey()))) {
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(agginessMap.get(nextFlowTaskResult.getTaskKey())), CustomFlowVarDto.class);
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(agginessMap.get(nextFlowTaskResult.getTaskKey())), CustomFlowVarDto.class);
|
|
- map.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), v -> customFlowVarDto.getApproveIds().size() == 1 ? customFlowVarDto.getApproveIds().get(0) : customFlowVarDto.getApproveIds());
|
|
|
|
|
|
+ if (Objects.nonNull(customFlowVarDto.getFlowTaskVar()) && customFlowVarDto.getFlowTaskVar().contains(DefaultInstanceConvertToMultiInstance.DEFAULT_ASSIGNEE_LIST)) {
|
|
|
|
+ map.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), v -> customFlowVarDto.getApproveIds());
|
|
|
|
+ } else {
|
|
|
|
+ map.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), v -> customFlowVarDto.getApproveIds().get(0));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|