zixi0825 commented on a change in pull request #2884:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r442614717
##########
File path:
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
Review comment:
problem fixed
##########
File path:
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -295,36 +295,188 @@ private String getResourceIds(ProcessData processData) {
/**
* copy process definition
- *
* @param loginUser login user
- * @param projectName project name
* @param processId process definition id
* @return copy result code
*/
- public Map<String, Object> copyProcessDefinition(User loginUser, String
projectName, Integer processId) throws JsonProcessingException {
+ private Map<String, Object> copyProcessDefinition(User loginUser,
+ Integer processId,
+ String targetProjectName)
throws JsonProcessingException {
Map<String, Object> result = new HashMap<>(5);
+
+ ProcessDefinition processDefinition =
processDefineMapper.selectById(processId);
+ if (processDefinition == null) {
+ putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, processId);
+ return result;
+ } else {
+ Project targetProject =
projectMapper.queryByName(targetProjectName);
Review comment:
problem fixed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]