Skip to content

Commit

Permalink
[Bug] [Fix-10673] Workflow recovery bug with failed tasks (#10722)
Browse files Browse the repository at this point in the history
* fix 10517

* fix dep warn bug

* fix recover bug

Co-authored-by: JinyLeeChina <jiny.li@foxmail.com>
  • Loading branch information
brave-lee and JinyLeeChina committed Jul 1, 2022
1 parent 2d5b9dc commit ab046da
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,22 @@ private boolean hasFailedTask() {
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;
}
Expand Down

0 comments on commit ab046da

Please sign in to comment.