From e66441a2c9ec38387b34f3712055af7308876efc Mon Sep 17 00:00:00 2001 From: privking <43061765+privking@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:32:18 +0800 Subject: [PATCH] [FIX] Fix cannot recover a stopped workflow instance (#15880) --- .../workflow/instance/pause/recover/RecoverExecuteFunction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/instance/pause/recover/RecoverExecuteFunction.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/instance/pause/recover/RecoverExecuteFunction.java index 149e1abd29b7..34bd2561b146 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/instance/pause/recover/RecoverExecuteFunction.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/instance/pause/recover/RecoverExecuteFunction.java @@ -43,7 +43,7 @@ public RecoverExecuteFunction(CommandService commandService) { @Override public RecoverExecuteResult execute(RecoverExecuteRequest request) throws ExecuteRuntimeException { ProcessInstance workflowInstance = request.getWorkflowInstance(); - if (!workflowInstance.getState().isPause()) { + if (!(workflowInstance.getState().isPause() || workflowInstance.getState().isStop())) { throw new ExecuteRuntimeException( String.format("The workflow instance: %s state is %s, cannot recovery", workflowInstance.getName(), workflowInstance.getState()));