A task instance that normally queries the serial wait state. (#9777)

Co-authored-by: WangJPLeo <wangjipeng@whaleops.com>
This commit is contained in:
WangJPLeo 2022-04-26 15:47:01 +08:00 committed by GitHub
parent 637028735d
commit 5c0be8a3d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -255,5 +255,5 @@ public interface ProcessInstanceMapper extends BaseMapper<ProcessInstance> {
boolean updateNextProcessIdById(@Param("thisInstanceId") int thisInstanceId, @Param("runningInstanceId") int runningInstanceId);
ProcessInstance loadNextProcess4Serial(@Param("processDefinitionCode") Long processDefinitionCode, @Param("state") int state);
ProcessInstance loadNextProcess4Serial(@Param("processDefinitionCode") Long processDefinitionCode, @Param("state") int state, @Param("id") int id);
}

View File

@ -823,7 +823,7 @@ public class WorkflowExecuteThread {
public void checkSerialProcess(ProcessDefinition processDefinition) {
int nextInstanceId = processInstance.getNextProcessInstanceId();
if (nextInstanceId == 0) {
ProcessInstance nextProcessInstance = this.processService.loadNextProcess4Serial(processInstance.getProcessDefinition().getCode(), ExecutionStatus.SERIAL_WAIT.getCode());
ProcessInstance nextProcessInstance = this.processService.loadNextProcess4Serial(processInstance.getProcessDefinition().getCode(), ExecutionStatus.SERIAL_WAIT.getCode(), processInstance.getId());
if (nextProcessInstance == null) {
return;
}

View File

@ -295,5 +295,5 @@ public interface ProcessService {
void sendStartTask2Master(ProcessInstance processInstance, int taskId,
org.apache.dolphinscheduler.remote.command.CommandType taskType);
ProcessInstance loadNextProcess4Serial(long code, int state);
ProcessInstance loadNextProcess4Serial(long code, int state, int id);
}

View File

@ -3031,8 +3031,8 @@ public class ProcessServiceImpl implements ProcessService {
}
@Override
public ProcessInstance loadNextProcess4Serial(long code, int state) {
return this.processInstanceMapper.loadNextProcess4Serial(code, state);
public ProcessInstance loadNextProcess4Serial(long code, int state, int id) {
return this.processInstanceMapper.loadNextProcess4Serial(code, state, id);
}
protected void deleteCommandWithCheck(int commandId) {