diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java index b7af67e675..e4f09e5a9c 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java @@ -668,6 +668,11 @@ public class WorkflowExecuteThread { logger.info("process:{} state {} change to {}", processInstance.getId(), processInstance.getState(), stateEvent.getExecutionStatus()); if (stateEvent.getExecutionStatus() == ExecutionStatus.STOP) { + // serial wait execution type needs to wake up the waiting process + if (processDefinition.getExecutionType().typeIsSerialWait()){ + endProcess(); + return true; + } this.updateProcessInstanceState(stateEvent); return true; } diff --git a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/WorkflowExecuteThreadTest.java b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/WorkflowExecuteThreadTest.java index 270dc318a7..6e1c84382d 100644 --- a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/WorkflowExecuteThreadTest.java +++ b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/WorkflowExecuteThreadTest.java @@ -164,7 +164,7 @@ public class WorkflowExecuteThreadTest { List taskInstances = (List) method.invoke(workflowExecuteThread, JSONUtils.toJsonString(cmdParam)); Assert.assertEquals(4, taskInstances.size()); - cmdParam.put(CMD_PARAM_RECOVERY_START_NODE_STRING, ""); + cmdParam.put(CMD_PARAM_RECOVERY_START_NODE_STRING, "1"); List taskInstanceEmpty = (List) method.invoke(workflowExecuteThread, JSONUtils.toJsonString(cmdParam)); Assert.assertTrue(taskInstanceEmpty.isEmpty());