You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/18 07:48:45 UTC
[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #12027: [Bug] [dolphinscheduler-service] error was raised when copy processDefinition
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:
![图片](https://user-images.githubusercontent.com/49931055/190891016-3f0c2a1f-b22b-4ad8-8040-2e258980bb64.png)
### 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
![图片](https://user-images.githubusercontent.com/49931055/190891216-00097a0f-b61a-45f8-b8c7-b22e0d999c15.png)
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.
![图片](https://user-images.githubusercontent.com/49931055/190891268-e22a9f8a-4d6a-4b8a-bf32-821ae439ae59.png)
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org