This is an automated email from the ASF dual-hosted git repository.

wangyang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 73a5a77db2 [Fix] Fix WorkflowInstance batch start failed will throw 
incorrect exception. (#15577)
73a5a77db2 is described below

commit 73a5a77db249cbfc69e564557bb067e6febda6d9
Author: 旺阳 <w...@lqwang.net>
AuthorDate: Tue Feb 6 13:16:25 2024 +0800

    [Fix] Fix WorkflowInstance batch start failed will throw incorrect 
exception. (#15577)
---
 .../dolphinscheduler/api/controller/ExecutorController.java       | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
index 22d44a08bf..98070b4d65 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
@@ -18,10 +18,12 @@
 package org.apache.dolphinscheduler.api.controller;
 
 import static 
org.apache.dolphinscheduler.api.enums.Status.BATCH_EXECUTE_PROCESS_INSTANCE_ERROR;
+import static 
org.apache.dolphinscheduler.api.enums.Status.BATCH_START_PROCESS_INSTANCE_ERROR;
 import static 
org.apache.dolphinscheduler.api.enums.Status.CHECK_PROCESS_DEFINITION_ERROR;
 import static 
org.apache.dolphinscheduler.api.enums.Status.EXECUTE_PROCESS_INSTANCE_ERROR;
 import static 
org.apache.dolphinscheduler.api.enums.Status.QUERY_EXECUTING_WORKFLOW_ERROR;
 import static 
org.apache.dolphinscheduler.api.enums.Status.START_PROCESS_INSTANCE_ERROR;
+import static 
org.apache.dolphinscheduler.api.enums.Status.START_TASK_INSTANCE_ERROR;
 
 import org.apache.dolphinscheduler.api.enums.ExecuteType;
 import org.apache.dolphinscheduler.api.enums.Status;
@@ -226,7 +228,7 @@ public class ExecutorController extends BaseController {
     })
     @PostMapping(value = "batch-start-process-instance")
     @ResponseStatus(HttpStatus.OK)
-    @ApiException(START_PROCESS_INSTANCE_ERROR)
+    @ApiException(BATCH_START_PROCESS_INSTANCE_ERROR)
     public Result batchStartProcessInstance(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                             @Parameter(name = "projectCode", 
description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
                                             @RequestParam(value = 
"processDefinitionCodes") String processDefinitionCodes,
@@ -292,7 +294,7 @@ public class ExecutorController extends BaseController {
         }
 
         if (!startFailedProcessDefinitionCodeList.isEmpty()) {
-            putMsg(result, Status.BATCH_START_PROCESS_INSTANCE_ERROR,
+            putMsg(result, BATCH_START_PROCESS_INSTANCE_ERROR,
                     String.join(Constants.COMMA, 
startFailedProcessDefinitionCodeList));
         }
 
@@ -437,7 +439,7 @@ public class ExecutorController extends BaseController {
     })
     @PostMapping(value = "/task-instance/{code}/start")
     @ResponseStatus(HttpStatus.OK)
-    @ApiException(START_PROCESS_INSTANCE_ERROR)
+    @ApiException(START_TASK_INSTANCE_ERROR)
     public Result<Boolean> startStreamTaskInstance(@Parameter(hidden = true) 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                                    @Parameter(name = 
"projectCode", description = "PROJECT_CODE", required = true) @PathVariable 
long projectCode,
                                                    @Parameter(name = "code", 
description = "TASK_CODE", required = true) @PathVariable long code,

Reply via email to