Browse Source

[fix-#14169]The subprocess type node is always in the ```ready pause ``` or ``` ready stop ``` state (#14170)

3.1.7-release
fuchanghai 2 years ago committed by GitHub
parent
commit
3554e7557a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/SubTaskProcessor.java

6
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/SubTaskProcessor.java

@ -178,7 +178,8 @@ public class SubTaskProcessor extends BaseTaskProcessor {
private boolean pauseSubWorkFlow() {
ProcessInstance subProcessInstance =
processService.findSubProcessInstance(processInstance.getId(), taskInstance.getId());
if (subProcessInstance == null || taskInstance.getState().isFinished()) {
if (subProcessInstance == null || taskInstance.getState().isFinished()
|| subProcessInstance.getState().isFinished()) {
return false;
}
subProcessInstance.setStateWithDesc(WorkflowExecutionStatus.READY_PAUSE, "ready pause sub workflow");
@ -214,7 +215,8 @@ public class SubTaskProcessor extends BaseTaskProcessor {
protected boolean killTask() {
ProcessInstance subProcessInstance =
processService.findSubProcessInstance(processInstance.getId(), taskInstance.getId());
if (subProcessInstance == null || taskInstance.getState().isFinished()) {
if (subProcessInstance == null || taskInstance.getState().isFinished()
|| subProcessInstance.getState().isFinished()) {
return false;
}
subProcessInstance.setStateWithDesc(WorkflowExecutionStatus.READY_STOP, "ready stop by kill task");

Loading…
Cancel
Save