Commit 7ba084bc4dfafeb0475ef04a4e1b9e7deef3abf6
1 parent
fb6771aa
fix:【BPM 工作流】子流程返回的 processInstanceId 不正确的问题
Showing
2 changed files
with
4 additions
and
4 deletions
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/instance/BpmApprovalDetailRespVO.java
| ... | ... | @@ -73,7 +73,7 @@ public class BpmApprovalDetailRespVO { |
| 73 | 73 | private List<UserSimpleBaseVO> candidateUsers; // 只包含未生成 ApprovalTaskInfo 的用户列表 |
| 74 | 74 | |
| 75 | 75 | @Schema(description = "流程编号", example = "8761d8e0-0922-11f0-bd37-00ff1db677bf") |
| 76 | - private String processInstanceId; // 当且仅当,该节点是子流程节点时,才会有值(CallActivity 的 processInstanceId 字段) | |
| 76 | + private String processInstanceId; // 当且仅当,该节点是子流程节点时,才会有值(CallActivity 的 calledProcessInstanceId 字段) | |
| 77 | 77 | |
| 78 | 78 | } |
| 79 | 79 | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| ... | ... | @@ -244,7 +244,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 244 | 244 | if (historicProcessInstance == null) { |
| 245 | 245 | throw exception(ErrorCodeConstants.PROCESS_INSTANCE_NOT_EXISTS); |
| 246 | 246 | } |
| 247 | - // 1.3 校验BpmnModel | |
| 247 | + // 1.3 校验 BpmnModel | |
| 248 | 248 | BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(task.getProcessDefinitionId()); |
| 249 | 249 | if (bpmnModel == null) { |
| 250 | 250 | return null; |
| ... | ... | @@ -449,7 +449,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 449 | 449 | .setNodeType(BpmSimpleModelNodeTypeEnum.CHILD_PROCESS.getType()).setStatus(processInstanceStatus) |
| 450 | 450 | .setStartTime(DateUtils.of(activity.getStartTime())) |
| 451 | 451 | .setEndTime(DateUtils.of(activity.getEndTime())) |
| 452 | - .setProcessInstanceId(activity.getProcessInstanceId()); | |
| 452 | + .setProcessInstanceId(activity.getCalledProcessInstanceId()); | |
| 453 | 453 | approvalNodes.add(callActivity); |
| 454 | 454 | } |
| 455 | 455 | }); |
| ... | ... | @@ -521,7 +521,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 521 | 521 | activityNode.setCandidateUserIds(CollUtil.sub(candidateUserIds, index + 1, candidateUserIds.size())); |
| 522 | 522 | } |
| 523 | 523 | if (BpmSimpleModelNodeTypeEnum.CHILD_PROCESS.getType().equals(activityNode.getNodeType())) { |
| 524 | - activityNode.setProcessInstanceId(firstActivity.getProcessInstanceId()); | |
| 524 | + activityNode.setProcessInstanceId(firstActivity.getCalledProcessInstanceId()); | |
| 525 | 525 | } |
| 526 | 526 | return activityNode; |
| 527 | 527 | }); | ... | ... |