diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/WorkflowStateEventHandler.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/WorkflowStateEventHandler.java index 6db84dadc1..018cff565a 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/WorkflowStateEventHandler.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/event/WorkflowStateEventHandler.java @@ -63,10 +63,13 @@ public class WorkflowStateEventHandler implements StateEventHandler { } workflowExecuteRunnable.endProcess(); } - if (processInstance.getState().isReadyStop()) { - workflowExecuteRunnable.killAllTasks(); - } + if (workflowStateEvent.getStatus().isReadyStop()) { + workflowExecuteRunnable.refreshProcessInstance(processInstance.getId()); + if (processInstance.getState().isReadyStop()) { + workflowExecuteRunnable.killAllTasks(); + } + } return true; }