|
@@ -805,7 +805,8 @@ public class MasterExecThread implements Runnable {
|
|
|
ProcessInstance instance = processService.findProcessInstanceById(processInstance.getId());
|
|
|
ExecutionStatus state = instance.getState();
|
|
|
|
|
|
- if(activeTaskNode.size() > 0 || haveRetryTaskStandBy()){
|
|
|
+ if(activeTaskNode.size() > 0 || retryTaskExists()){
|
|
|
+
|
|
|
return runningState(state);
|
|
|
}
|
|
|
|
|
@@ -828,7 +829,8 @@ public class MasterExecThread implements Runnable {
|
|
|
List<TaskInstance> stopList = getCompleteTaskByState(ExecutionStatus.STOP);
|
|
|
List<TaskInstance> killList = getCompleteTaskByState(ExecutionStatus.KILL);
|
|
|
if(CollectionUtils.isNotEmpty(stopList)
|
|
|
- || CollectionUtils.isNotEmpty(killList) || !isComplementEnd()){
|
|
|
+ || CollectionUtils.isNotEmpty(killList)
|
|
|
+ || !isComplementEnd()){
|
|
|
return ExecutionStatus.STOP;
|
|
|
}else{
|
|
|
return ExecutionStatus.SUCCESS;
|
|
@@ -837,9 +839,13 @@ public class MasterExecThread implements Runnable {
|
|
|
|
|
|
|
|
|
if(state == ExecutionStatus.RUNNING_EXEUTION){
|
|
|
+ List<TaskInstance> killTasks = getCompleteTaskByState(ExecutionStatus.KILL);
|
|
|
if(readyToSubmitTaskList.size() > 0){
|
|
|
|
|
|
return ExecutionStatus.RUNNING_EXEUTION;
|
|
|
+ }else if(CollectionUtils.isNotEmpty(killTasks)){
|
|
|
+
|
|
|
+ return ExecutionStatus.FAILURE;
|
|
|
}else{
|
|
|
|
|
|
return ExecutionStatus.SUCCESS;
|
|
@@ -853,7 +859,7 @@ public class MasterExecThread implements Runnable {
|
|
|
* whether standby task list have retry tasks
|
|
|
* @return
|
|
|
*/
|
|
|
- private boolean haveRetryTaskStandBy() {
|
|
|
+ private boolean retryTaskExists() {
|
|
|
|
|
|
boolean result = false;
|
|
|
|