未验证 提交 5c0be8a3 编写于 作者: W WangJPLeo 提交者: GitHub

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

Co-authored-by: NWangJPLeo <wangjipeng@whaleops.com>
上级 63702873
...@@ -255,5 +255,5 @@ public interface ProcessInstanceMapper extends BaseMapper<ProcessInstance> { ...@@ -255,5 +255,5 @@ public interface ProcessInstanceMapper extends BaseMapper<ProcessInstance> {
boolean updateNextProcessIdById(@Param("thisInstanceId") int thisInstanceId, @Param("runningInstanceId") int runningInstanceId); 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);
} }
...@@ -823,7 +823,7 @@ public class WorkflowExecuteThread { ...@@ -823,7 +823,7 @@ public class WorkflowExecuteThread {
public void checkSerialProcess(ProcessDefinition processDefinition) { public void checkSerialProcess(ProcessDefinition processDefinition) {
int nextInstanceId = processInstance.getNextProcessInstanceId(); int nextInstanceId = processInstance.getNextProcessInstanceId();
if (nextInstanceId == 0) { 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) { if (nextProcessInstance == null) {
return; return;
} }
......
...@@ -295,5 +295,5 @@ public interface ProcessService { ...@@ -295,5 +295,5 @@ public interface ProcessService {
void sendStartTask2Master(ProcessInstance processInstance, int taskId, void sendStartTask2Master(ProcessInstance processInstance, int taskId,
org.apache.dolphinscheduler.remote.command.CommandType taskType); org.apache.dolphinscheduler.remote.command.CommandType taskType);
ProcessInstance loadNextProcess4Serial(long code, int state); ProcessInstance loadNextProcess4Serial(long code, int state, int id);
} }
...@@ -3031,8 +3031,8 @@ public class ProcessServiceImpl implements ProcessService { ...@@ -3031,8 +3031,8 @@ public class ProcessServiceImpl implements ProcessService {
} }
@Override @Override
public ProcessInstance loadNextProcess4Serial(long code, int state) { public ProcessInstance loadNextProcess4Serial(long code, int state, int id) {
return this.processInstanceMapper.loadNextProcess4Serial(code, state); return this.processInstanceMapper.loadNextProcess4Serial(code, state, id);
} }
protected void deleteCommandWithCheck(int commandId) { protected void deleteCommandWithCheck(int commandId) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册