BenjaminWenqiYu opened a new issue #6314: URL: https://github.com/apache/dolphinscheduler/issues/6314
### 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 when I delete the processDefinition, it's related task cannot be deleted; then when I create another task instance with the same name will throw an error. First, when i create a process definition named 'shell_test', it has one task named 'shell_test';  Second, I delete the 'shell_test' process definition; it return success.  Third, i create a process definition the same as the first step. It will throw an exception.  Fourth, I query the database, I found the 'shell_test' task instance has not been deleted.  ### What you expected to happen When I delete the process definition, it will also delete it's task instance. ### How to reproduce It can be reproduced in dev branch. ### Anything else _No response_ ### Are you willing to submit PR? - [X] 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]
