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

[Fix-9906] After the serial wait execution strategy stops the running workflow...

[Fix-9906] After the serial wait execution strategy stops the running workflow instance, the instance will be woken up and executed if there is a wait instance. (#9907)

* After the serial wait execution strategy stops the running workflow instance, the instance will be woken up and executed if there is a wait instance.

* clear logic

* Resource overloading
上级 7a7807e5
......@@ -668,6 +668,11 @@ public class WorkflowExecuteThread {
logger.info("process:{} state {} change to {}", processInstance.getId(), processInstance.getState(), stateEvent.getExecutionStatus());
if (stateEvent.getExecutionStatus() == ExecutionStatus.STOP) {
// serial wait execution type needs to wake up the waiting process
if (processDefinition.getExecutionType().typeIsSerialWait()){
endProcess();
return true;
}
this.updateProcessInstanceState(stateEvent);
return true;
}
......
......@@ -164,7 +164,7 @@ public class WorkflowExecuteThreadTest {
List<TaskInstance> taskInstances = (List<TaskInstance>) method.invoke(workflowExecuteThread, JSONUtils.toJsonString(cmdParam));
Assert.assertEquals(4, taskInstances.size());
cmdParam.put(CMD_PARAM_RECOVERY_START_NODE_STRING, "");
cmdParam.put(CMD_PARAM_RECOVERY_START_NODE_STRING, "1");
List<TaskInstance> taskInstanceEmpty = (List<TaskInstance>) method.invoke(workflowExecuteThread, JSONUtils.toJsonString(cmdParam));
Assert.assertTrue(taskInstanceEmpty.isEmpty());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册