chempin opened a new issue, #13635: URL: https://github.com/apache/dolphinscheduler/issues/13635
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened A process execute with "serial wait" policy and faild with retry times. When process is in the retry interval , try to stop the process instance. The process instance state will be changed to ready stop and never changed to stop. ### What you expected to happen Make sure every process instance could be stop. ### How to reproduce 1、 create a new process instance and execute it with "serial wait" policy and set retry times >0 2、make sure process instance will be failed, and stop process instance befroe it retry 3、process instance state will be ready stop and never changed to stop. ### Anything else public class WorkflowStateEventHandler implements StateEventHandler { private static final Logger logger = LoggerFactory.getLogger(WorkflowStateEventHandler.class); @Override public boolean handleStateEvent(WorkflowExecuteRunnable workflowExecuteRunnable, StateEvent stateEvent) throws StateEventHandleException { WorkflowStateEvent workflowStateEvent = (WorkflowStateEvent) stateEvent; measureProcessState(workflowStateEvent); ProcessInstance processInstance = workflowExecuteRunnable.getProcessInstance(); ProcessDefinition processDefinition = processInstance.getProcessDefinition(); logger.info( "Handle workflow instance state event, the current workflow instance state {} will be changed to {}", processInstance.getState(), workflowStateEvent.getStatus()); if (workflowStateEvent.getStatus().isStop()) { // serial wait execution type needs to wake up the waiting process if (processDefinition.getExecutionType().typeIsSerialWait() || processDefinition.getExecutionType() .typeIsSerialPriority()) { workflowExecuteRunnable.endProcess(); // return true; } workflowExecuteRunnable.updateProcessInstanceState(workflowStateEvent); return true; } if (workflowExecuteRunnable.processComplementData()) { return true; } if (workflowStateEvent.getStatus().isFinished()) { workflowExecuteRunnable.endProcess(); } if (processInstance.getState().isReadyStop()) { workflowExecuteRunnable.killAllTasks(); } return true; } I have try to delete this return, and problem fixed ### Version 3.1.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
