[Fix-8506][Master] process instance stop result wrong (#8529)

* fix bug_8506

* recover success state
slim
xiangzihao 2022-03-01 15:20:02 +08:00 committed by GitHub
parent 3cfb3270fe
commit 74afdcf8f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -415,6 +415,9 @@ public class WorkflowExecuteThread {
iTaskProcessor.action(TaskAction.RUN);
if (iTaskProcessor.taskInstance().getState().typeIsFinished()) {
if (iTaskProcessor.taskInstance().getState() != task.getState()) {
task.setState(iTaskProcessor.taskInstance().getState());
}
taskFinished(task);
}
return true;
@ -455,7 +458,10 @@ public class WorkflowExecuteThread {
killAllTasks();
}
}
} else if (taskInstance.getState().typeIsFinished()) {
completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId());
}
this.updateProcessInstanceState();
}