[Bug][Master][Fixes 14216]workflow state keep READY_STOP when sub_process state … (#14221)

* [Bug] [Master] workflow state keep READY_STOP when sub_process state STOP
Fixes #14216

* [Bug] [Master] workflow state keep READY_STOP when sub_process state STOP
Fixes  mvn spotless:apply#14216

* Update testFile.txt.crc

* Update testFile.txt.crc

* Delete testFile.txt.crc
This commit is contained in:
HQFGit 2023-06-06 11:04:32 +08:00 committed by GitHub
parent fdb8fde776
commit d587b5f03d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1688,8 +1688,10 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatus> {
if (state == WorkflowExecutionStatus.READY_STOP) {
List<TaskInstance> killList = getCompleteTaskByState(TaskExecutionStatus.KILL);
List<TaskInstance> failList = getCompleteTaskByState(TaskExecutionStatus.FAILURE);
List<TaskInstance> stopList = getCompleteTaskByState(TaskExecutionStatus.STOP);
WorkflowExecutionStatus executionStatus;
if (CollectionUtils.isNotEmpty(killList) || CollectionUtils.isNotEmpty(failList) || !isComplementEnd()) {
if (CollectionUtils.isNotEmpty(stopList) || CollectionUtils.isNotEmpty(killList)
|| CollectionUtils.isNotEmpty(failList) || !isComplementEnd()) {
executionStatus = WorkflowExecutionStatus.STOP;
} else {
executionStatus = WorkflowExecutionStatus.SUCCESS;

View File

@ -88,8 +88,12 @@ public enum TaskExecutionStatus {
return this == TaskExecutionStatus.PAUSE;
}
public boolean isStop() {
return this == TaskExecutionStatus.STOP;
}
public boolean isFinished() {
return isSuccess() || isKill() || isFailure() || isPause();
return isSuccess() || isKill() || isFailure() || isPause() || isStop();
}
public boolean isNeedFaultTolerance() {