未验证 提交 8380c696 编写于 作者: J JiPeng Wang 提交者: GitHub

Merge pull request #59 from WhaleOps/inner/stopable

[Improvement]Add a stop function when workflow is ready pause status
......@@ -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.
先完成此消息的编辑!
想要评论请 注册