|
@@ -39,12 +39,6 @@ public enum TaskExecutionStatus {
|
|
|
;
|
|
|
|
|
|
private static final Map<Integer, TaskExecutionStatus> CODE_MAP = new HashMap<>();
|
|
|
- private static final int[] NEED_FAILOVER_STATES = new int[]{
|
|
|
- SUBMITTED_SUCCESS.getCode(),
|
|
|
- DISPATCH.getCode(),
|
|
|
- RUNNING_EXECUTION.getCode(),
|
|
|
- DELAY_EXECUTION.getCode(),
|
|
|
- };
|
|
|
|
|
|
static {
|
|
|
for (TaskExecutionStatus executionStatus : TaskExecutionStatus.values()) {
|
|
@@ -93,17 +87,13 @@ public enum TaskExecutionStatus {
|
|
|
}
|
|
|
|
|
|
public boolean isFinished() {
|
|
|
- return isSuccess() || isKill() || isFailure() || isPause() || isStop();
|
|
|
+ return isSuccess() || isKill() || isFailure() || isPause() || isStop() || isForceSuccess();
|
|
|
}
|
|
|
|
|
|
public boolean isNeedFaultTolerance() {
|
|
|
return this == NEED_FAULT_TOLERANCE;
|
|
|
}
|
|
|
|
|
|
- public static int[] getNeedFailoverWorkflowInstanceState() {
|
|
|
- return NEED_FAILOVER_STATES;
|
|
|
- }
|
|
|
-
|
|
|
public boolean shouldFailover() {
|
|
|
return SUBMITTED_SUCCESS == this
|
|
|
|| DISPATCH == this
|