fix bug-6279 Parallel tasks would be Irregularly submitted twice (#6280)

This commit is contained in:
OS 2021-09-21 12:04:31 +08:00 committed by GitHub
parent 7098855ee0
commit b71967b017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 1 deletions

View File

@ -192,6 +192,12 @@ public class WorkflowExecuteThread implements Runnable {
private ConcurrentHashMap<Integer, TaskInstance> 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;
}
}