caishunfeng commented on code in PR #11350:
URL: https://github.com/apache/dolphinscheduler/pull/11350#discussion_r942224183
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractTask.java:
##########
@@ -101,6 +118,48 @@ public void cancelApplication(boolean status) throws
Exception {
this.cancel = status;
}
+ /**
+ * get application ids
+ * @return
+ * @throws IOException
+ */
+ public List<String> getApplicationIds() throws IOException {
+ List<String> appIds = new ArrayList<>();
Review Comment:
done
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java:
##########
@@ -380,4 +380,55 @@ public Result queryExecutingWorkflow(@RequestParam("id")
Integer processInstance
WorkflowExecuteDto workflowExecuteDto =
execService.queryExecutingWorkflowByProcessInstanceId(processInstanceId);
return Result.success(workflowExecuteDto);
}
+
+ /**
+ * execute task instance
+ *
+ * @param loginUser login user
+ * @param projectCode project code
+ * @param code taskDefinitionCode
+ * @param version taskDefinitionVersion
+ * @param failureStrategy failure strategy
+ * @param execType execute type
+ * @param warningType warning type
+ * @param warningGroupId warning group id
+ * @param workerGroup worker group
+ * @param timeout timeout
+ * @return start task result code
+ */
+ @ApiOperation(value = "startTaskInstance", notes =
"RUN_TASK_INSTANCE_NOTES")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "version", value = "VERSION", dataType =
"Int", example = "1"),
+ @ApiImplicitParam(name = "failureStrategy", value =
"FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
+ @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataType
= "CommandType"),
+ @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE",
required = true, dataType = "WarningType"),
+ @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID",
dataType = "Int", example = "100"),
+ @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP",
dataType = "String", example = "default"),
+ @ApiImplicitParam(name = "environmentCode", value =
"ENVIRONMENT_CODE", dataType = "Long", example = "-1"),
+ @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataType =
"Int", example = "100"),
+ @ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataType =
"Int", example = "0"),
+ })
+ @PostMapping(value = "/task-instance/{code}/start")
+ @ResponseStatus(HttpStatus.OK)
+ @ApiException(START_PROCESS_INSTANCE_ERROR)
+ @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
+ public Result startTaskInstance(@ApiIgnore @RequestAttribute(value =
Constants.SESSION_USER) User loginUser,
Review Comment:
done
--
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]