[Bug] [Fix-10673] Workflow recovery bug with failed tasks (#10722)

* fix 10517

* fix dep warn bug

* fix recover bug

Co-authored-by: JinyLeeChina <jiny.li@foxmail.com>
This commit is contained in:
JinYong Li 2022-07-01 13:58:05 +08:00 committed by GitHub
parent 2d5b9dca00
commit ab046dae9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -1125,6 +1125,22 @@ public class WorkflowExecuteThread implements Runnable {
if (errorTaskList.size() > 0) {
return true;
}
} else {
if (processInstance.getCommandType() == CommandType.RECOVER_TOLERANCE_FAULT_PROCESS
|| processInstance.getCommandType() == CommandType.RECOVER_SUSPENDED_PROCESS) {
List<Integer> failedList = processService.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE);
if (!failedList.isEmpty()) {
return true;
}
List<Integer> toleranceList = processService.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE);
if (!toleranceList.isEmpty()) {
return true;
}
List<Integer> killedList = processService.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL);
if (!killedList.isEmpty()) {
return true;
}
}
}
return dependFailedTask.size() > 0;
}