github-actions[bot] commented on issue #12027: URL: https://github.com/apache/dolphinscheduler/issues/12027#issuecomment-1250213729
### 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 As bug title said:  ### What you expected to happen No error occurred ### How to reproduce As shown in the figure: In Workflow Definition Page,click button ‘copy workflow’。 ### Anything else the cause is that : 1. In Method `org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl#doBatchOperateProcessDefinition` the target processDefinition obj's id set to 0  2.while In Next Step Method `org.apache.dolphinscheduler.service.process.ProcessServiceImpl#saveProcessDefine` it determines whether the obj's ID is null , and only is null then creating an object , if not then throw an error.  So there are two ways to fix this problem : `set id to null` or `determines whether the obj's ID is 0 or null` before creating the target processDefinition ### Version dev ### 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]
