提交 634d2d97 编写于 作者: J juzimao

[Improvement]Add a stop function when you are ready to do pause operation (#11543)

* add can stop for execute state machine

* add execute type check for pause operation
上级 0b85d70b
......@@ -455,11 +455,15 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
boolean checkResult = false;
switch (executeType) {
case PAUSE:
case STOP:
if (executionStatus.typeIsRunning()) {
checkResult = true;
}
break;
case STOP:
if (executionStatus.canStop()) {
checkResult = true;
}
break;
case REPEAT_RUNNING:
if (executionStatus.typeIsFinished()) {
checkResult = true;
......
......@@ -203,4 +203,8 @@ public enum ExecutionStatus {
public static int[] getNeedFailoverWorkflowInstanceState() {
return NEED_FAILOVER_STATES;
}
public boolean canStop() {
return typeIsRunning() || this == READY_PAUSE;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册