fix(我的流程): 修复由于查询不到历史任务信息导致异常bug

This commit is contained in:
konbai
2022-10-08 22:02:00 +08:00
parent 4bc7e08889
commit c9b3a7563d

View File

@@ -260,7 +260,9 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
} else { } else {
List<HistoricTaskInstance> historicTaskInstance = historyService.createHistoricTaskInstanceQuery() List<HistoricTaskInstance> historicTaskInstance = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(hisIns.getId()).orderByHistoricTaskInstanceEndTime().desc().list(); .processInstanceId(hisIns.getId()).orderByHistoricTaskInstanceEndTime().desc().list();
taskVo.setTaskId(historicTaskInstance.get(0).getId()); if (CollUtil.isNotEmpty(historicTaskInstance)) {
taskVo.setTaskId(historicTaskInstance.get(0).getId());
}
} }
taskVoList.add(taskVo); taskVoList.add(taskVo);
} }