Commit 9d16ac51 authored by wdy's avatar wdy

开始任务

parent 0e92455c
...@@ -173,11 +173,10 @@ public class Task { ...@@ -173,11 +173,10 @@ public class Task {
public String getNextNode() { public String getNextNode() {
String[] split = taskList.split(","); String[] split = taskList.split(",");
if(pointer + 1 > maxPointer) { if(pointer < split.length) {
return null; return split[pointer];
} else {
return split[pointer + 1];
} }
return null;
} }
public void setSystemReviewTaskIdNull(){ public void setSystemReviewTaskIdNull(){
......
...@@ -39,7 +39,9 @@ public abstract class TaskStateAdapter implements TaskState { ...@@ -39,7 +39,9 @@ public abstract class TaskStateAdapter implements TaskState {
throw new ServiceException("已没有可执行的子任务节点", HttpStatus.ERROR); throw new ServiceException("已没有可执行的子任务节点", HttpStatus.ERROR);
} }
task.setPointer(task.getPointer() + 1); if (task.getPointer() + 1 <= task.getMaxPointer() ) {
task.setPointer(task.getPointer() + 1);
}
taskService.updateById(task); taskService.updateById(task);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment