[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:
parent
2d5b9dca00
commit
ab046dae9d
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue