ruanwenjun commented on code in PR #15198:
URL: 
https://github.com/apache/dolphinscheduler/pull/15198#discussion_r1402851234


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java:
##########
@@ -712,119 +711,6 @@ public Result importProcessDefinition(@Parameter(hidden = 
true) @RequestAttribut
         return returnDataList(result);
     }
 
-    /**
-     * create empty process definition
-     *
-     * @param loginUser login user
-     * @param projectCode project code
-     * @param name process definition name
-     * @param description description
-     * @param globalParams globalParams
-     * @param timeout timeout
-     * @param scheduleJson scheduleJson
-     * @return process definition code
-     */
-    @Operation(summary = "createEmptyProcessDefinition", description = 
"CREATE_EMPTY_PROCESS_NOTES")
-    @Parameters({
-            @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", 
required = true, schema = @Schema(implementation = String.class)),
-            @Parameter(name = "projectCode", description = "PROJECT_CODE", 
required = true, schema = @Schema(implementation = long.class, example = 
"123456789")),
-            @Parameter(name = "description", description = 
"PROCESS_DEFINITION_DESC", required = false, schema = @Schema(implementation = 
String.class))
-    })
-    @PostMapping(value = "/empty")
-    @ResponseStatus(HttpStatus.OK)
-    @ApiException(CREATE_PROCESS_DEFINITION_ERROR)
-    public Result createEmptyProcessDefinition(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
-                                               @Parameter(name = 
"projectCode", description = "PROJECT_CODE", required = true) @PathVariable 
long projectCode,
-                                               @RequestParam(value = "name", 
required = true) String name,
-                                               @RequestParam(value = 
"description", required = false) String description,
-                                               @RequestParam(value = 
"globalParams", required = false, defaultValue = "[]") String globalParams,
-                                               @RequestParam(value = 
"timeout", required = false, defaultValue = "0") int timeout,
-                                               @RequestParam(value = 
"scheduleJson", required = false) String scheduleJson,
-                                               @RequestParam(value = 
"executionType", defaultValue = "PARALLEL") ProcessExecutionTypeEnum 
executionType) {
-        return 
returnDataList(processDefinitionService.createEmptyProcessDefinition(loginUser, 
projectCode, name,
-                description, globalParams,
-                timeout, scheduleJson, executionType));
-    }
-
-    /**
-     * update process definition basic info, not including task definition, 
task relation and location.
-     *
-     * @param loginUser login user
-     * @param projectCode project code
-     * @param name process definition name
-     * @param code process definition code
-     * @param description description
-     * @param globalParams globalParams
-     * @param timeout timeout
-     * @param scheduleJson scheduleJson
-     * @param executionType executionType
-     * @param releaseState releaseState
-     * @param otherParamsJson otherParamsJson handle other params
-     * @return update result code
-     */
-    @Operation(summary = "updateBasicInfo", description = 
"UPDATE_PROCESS_DEFINITION_BASIC_INFO_NOTES")
-    @Parameters({
-            @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", 
required = true, schema = @Schema(implementation = String.class)),
-            @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", 
required = true, schema = @Schema(implementation = long.class, example = 
"123456789")),
-            @Parameter(name = "description", description = 
"PROCESS_DEFINITION_DESC", required = false, schema = @Schema(implementation = 
String.class)),
-            @Parameter(name = "releaseState", description = 
"RELEASE_PROCESS_DEFINITION_NOTES", required = false, schema = 
@Schema(implementation = ReleaseState.class)),
-            @Parameter(name = "otherParamsJson", description = 
"OTHER_PARAMS_JSON", required = false, schema = @Schema(implementation = 
String.class))
-    })
-    @PutMapping(value = "/{code}/basic-info")
-    @ResponseStatus(HttpStatus.OK)
-    @ApiException(UPDATE_PROCESS_DEFINITION_ERROR)
-    public Result updateProcessDefinitionBasicInfo(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
-                                                   @Parameter(name = 
"projectCode", description = "PROJECT_CODE", required = true) @PathVariable 
long projectCode,
-                                                   @RequestParam(value = 
"name", required = true) String name,
-                                                   @PathVariable(value = 
"code", required = true) long code,
-                                                   @RequestParam(value = 
"description", required = false) String description,
-                                                   @RequestParam(value = 
"globalParams", required = false, defaultValue = "[]") String globalParams,
-                                                   @RequestParam(value = 
"timeout", required = false, defaultValue = "0") int timeout,
-                                                   @RequestParam(value = 
"scheduleJson", required = false) String scheduleJson,
-                                                   @RequestParam(value = 
"otherParamsJson", required = false) String otherParamsJson,
-                                                   @RequestParam(value = 
"executionType", defaultValue = "PARALLEL") ProcessExecutionTypeEnum 
executionType,
-                                                   @RequestParam(value = 
"releaseState", required = false, defaultValue = "OFFLINE") ReleaseState 
releaseState) {
-        Map<String, Object> result = 
processDefinitionService.updateProcessDefinitionBasicInfo(loginUser, 
projectCode,
-                name, code, description, globalParams,
-                timeout, scheduleJson, otherParamsJson, executionType);
-        // If the update fails, the result will be returned directly
-        if (result.get(Constants.STATUS) != Status.SUCCESS) {
-            return returnDataList(result);
-        }
-
-        // Judge whether to go online after editing,0 means offline, 1 means 
online
-        if (releaseState == ReleaseState.ONLINE) {
-            result = 
processDefinitionService.releaseWorkflowAndSchedule(loginUser, projectCode, 
code, releaseState);
-        }
-        return returnDataList(result);
-    }
-
-    /**
-     * release process definition and schedule
-     *
-     * @param loginUser login user
-     * @param projectCode project code
-     * @param code process definition code
-     * @param releaseState releaseState
-     * @return update result code
-     */
-    @Operation(summary = "releaseWorkflowAndSchedule", description = 
"RELEASE_WORKFLOW_SCHEDULE_NOTES")
-    @Parameters({
-            @Parameter(name = "projectCode", description = 
"PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = 
long.class)),
-            @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", 
required = true, schema = @Schema(implementation = long.class, example = 
"123456789")),
-            @Parameter(name = "releaseState", description = 
"RELEASE_PROCESS_DEFINITION_NOTES", required = true, schema = 
@Schema(implementation = ReleaseState.class))
-    })
-    @PostMapping(value = "/{code}/release-workflow")
-    @ResponseStatus(HttpStatus.OK)
-    @ApiException(RELEASE_PROCESS_DEFINITION_ERROR)
-    public Result releaseWorkflowAndSchedule(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,

Review Comment:
   This seems miss submittd, this interface is never used at ds, and we didn't 
declare we have this interface in `open-api`.



-- 
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]

Reply via email to