[Bug][Api] Fix NPE when deleting a workflow instance (#15485) (#15488)

This commit is contained in:
sunsongyang 2024-01-17 22:03:33 +08:00 committed by GitHub
parent c7a11ce6ed
commit e1fcd4e485
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -379,9 +379,12 @@ public class TaskInstanceServiceImpl extends BaseServiceImpl implements TaskInst
return;
}
for (TaskInstance taskInstance : needToDeleteTaskInstances) {
ILogService iLogService =
SingletonJdkDynamicRpcClientProxyFactory.getProxyClient(taskInstance.getHost(), ILogService.class);
iLogService.removeTaskInstanceLog(taskInstance.getLogPath());
if (StringUtils.isNotBlank(taskInstance.getLogPath())) {
ILogService iLogService =
SingletonJdkDynamicRpcClientProxyFactory.getProxyClient(taskInstance.getHost(),
ILogService.class);
iLogService.removeTaskInstanceLog(taskInstance.getLogPath());
}
}
dqExecuteResultDao.deleteByWorkflowInstanceId(workflowInstanceId);