diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java index b0e149ae2b..a977f0bb77 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java @@ -192,6 +192,12 @@ public class WorkflowExecuteThread implements Runnable { private ConcurrentHashMap taskTimeoutCheckList; + /** + * start flag, true: start nodes submit completely + * + */ + private boolean isStart = false; + /** * constructor of WorkflowExecuteThread * @@ -228,6 +234,14 @@ public class WorkflowExecuteThread implements Runnable { } } + /** + * the process start nodes are submitted completely. + * @return + */ + public boolean isStart() { + return this.isStart; + } + private void handleEvents() { while (this.stateEvents.size() > 0) { @@ -460,10 +474,12 @@ public class WorkflowExecuteThread implements Runnable { } private void startProcess() throws Exception { - buildFlowDag(); if (this.taskInstanceHashMap.size() == 0) { + isStart = false; + buildFlowDag(); initTaskQueue(); submitPostNode(null); + isStart = true; } }