fuchanghai commented on code in PR #14089:
URL:
https://github.com/apache/dolphinscheduler/pull/14089#discussion_r1198751442
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java:
##########
@@ -879,4 +880,29 @@ public Result viewVariables(@Parameter(hidden = true)
@RequestAttribute(value =
return returnDataList(result);
}
+ /**
+ * Batch release process definition by code states
+ *
+ * @param loginUser Login user
+ * @param projectCode Project code
+ * @param codeStates Process definition code states
+ * @return Result of the batch release operation
+ */
+ @Operation(summary = "batchReleaseProcessDefinitionByCodeStates",
description = "BATCH_RELEASE_PROCESS_DEFINITION_BY_CODE_STATES_NOTES")
+ @Parameters({
+ @Parameter(name = "codeStates", description = "Process definition
code states", required = true, schema = @Schema(implementation = String.class))
+ })
+ @PostMapping(value = "/batch-release")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(BATCH_RELEASE_PROCESS_DEFINE_BY_CODE_STATES_ERROR)
+ @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
+ public Result batchReleaseProcessDefinitionByCodeStates(
+ @Parameter(hidden
= true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name =
"projectCode", description = "Project code", required = true) @PathVariable
long projectCode,
+
@RequestParam("codeStates") String codeStates) {
Review Comment:
perhaps we can split ```codeStates``` into two parameters, one is the code
defined by all processes, and the other is the status of online or offline
WDYT? cc @Radeity
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java:
##########
@@ -532,6 +532,9 @@ public enum Status {
QUERY_PROCESS_DEFINITION_ALL_VARIABLES_ERROR(1300100, "query process
definition all variables error",
"查询工作流自定义变量信息错误"),
+ BATCH_RELEASE_PROCESS_DEFINE_BY_CODE_STATES_ERROR(1300101, "batch release
process definition by code states error",
+ "批量释放工作流定义失败"),
Review Comment:
It is better to change it to ``` "批量{0}工作流失败" ``` Whether it is online or
offline, we can get it through the parameters of the interface
--
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]