|
|
@ -17,8 +17,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.apache.dolphinscheduler.api.controller; |
|
|
|
package org.apache.dolphinscheduler.api.controller; |
|
|
|
|
|
|
|
|
|
|
|
import static org.apache.dolphinscheduler.api.enums.Status.*; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation; |
|
|
|
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation; |
|
|
|
import org.apache.dolphinscheduler.api.enums.Status; |
|
|
|
import org.apache.dolphinscheduler.api.enums.Status; |
|
|
|
import org.apache.dolphinscheduler.api.exceptions.ApiException; |
|
|
|
import org.apache.dolphinscheduler.api.exceptions.ApiException; |
|
|
@ -103,7 +101,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping() |
|
|
|
@GetMapping() |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR) |
|
|
|
@ApiException(Status.QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR) |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
public Result queryProcessInstanceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result queryProcessInstanceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -143,7 +141,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping(value = "/{id}/tasks") |
|
|
|
@GetMapping(value = "/{id}/tasks") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR) |
|
|
|
@ApiException(Status.QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR) |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
public Result queryTaskListByProcessId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result queryTaskListByProcessId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -180,7 +178,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@PutMapping(value = "/{id}") |
|
|
|
@PutMapping(value = "/{id}") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(UPDATE_PROCESS_INSTANCE_ERROR) |
|
|
|
@ApiException(Status.UPDATE_PROCESS_INSTANCE_ERROR) |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
public Result updateProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result updateProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -213,7 +211,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping(value = "/{id}") |
|
|
|
@GetMapping(value = "/{id}") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(QUERY_PROCESS_INSTANCE_BY_ID_ERROR) |
|
|
|
@ApiException(Status.QUERY_PROCESS_INSTANCE_BY_ID_ERROR) |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
public Result queryProcessInstanceById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result queryProcessInstanceById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -240,7 +238,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping(value = "/top-n") |
|
|
|
@GetMapping(value = "/top-n") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(QUERY_PROCESS_INSTANCE_BY_ID_ERROR) |
|
|
|
@ApiException(Status.QUERY_PROCESS_INSTANCE_BY_ID_ERROR) |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
public Result<ProcessInstance> queryTopNLongestRunningProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result<ProcessInstance> queryTopNLongestRunningProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -267,7 +265,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@DeleteMapping(value = "/{id}") |
|
|
|
@DeleteMapping(value = "/{id}") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(DELETE_PROCESS_INSTANCE_BY_ID_ERROR) |
|
|
|
@ApiException(Status.DELETE_PROCESS_INSTANCE_BY_ID_ERROR) |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
public Result<ProcessInstance> deleteProcessInstanceById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result<ProcessInstance> deleteProcessInstanceById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -290,7 +288,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping(value = "/query-sub-by-parent") |
|
|
|
@GetMapping(value = "/query-sub-by-parent") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR) |
|
|
|
@ApiException(Status.QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR) |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
@AccessLogAnnotation(ignoreRequestArgs = "loginUser") |
|
|
|
public Result querySubProcessInstanceByTaskId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result querySubProcessInstanceByTaskId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -314,7 +312,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping(value = "/query-parent-by-sub") |
|
|
|
@GetMapping(value = "/query-parent-by-sub") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR) |
|
|
|
@ApiException(Status.QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR) |
|
|
|
@AccessLogAnnotation |
|
|
|
@AccessLogAnnotation |
|
|
|
public Result queryParentInstanceBySubId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result queryParentInstanceBySubId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -336,7 +334,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping(value = "/{id}/view-variables") |
|
|
|
@GetMapping(value = "/{id}/view-variables") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR) |
|
|
|
@ApiException(Status.QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR) |
|
|
|
@AccessLogAnnotation |
|
|
|
@AccessLogAnnotation |
|
|
|
public Result viewVariables(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result viewVariables(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -359,7 +357,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@GetMapping(value = "/{id}/view-gantt") |
|
|
|
@GetMapping(value = "/{id}/view-gantt") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR) |
|
|
|
@ApiException(Status.ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR) |
|
|
|
@AccessLogAnnotation |
|
|
|
@AccessLogAnnotation |
|
|
|
public Result viewTree(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result viewTree(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
|
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode, |
|
|
@ -384,7 +382,7 @@ public class ProcessInstanceController extends BaseController { |
|
|
|
}) |
|
|
|
}) |
|
|
|
@PostMapping(value = "/batch-delete") |
|
|
|
@PostMapping(value = "/batch-delete") |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ResponseStatus(HttpStatus.OK) |
|
|
|
@ApiException(BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR) |
|
|
|
@ApiException(Status.BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR) |
|
|
|
@AccessLogAnnotation |
|
|
|
@AccessLogAnnotation |
|
|
|
public Result batchDeleteProcessInstanceByIds(@RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
public Result batchDeleteProcessInstanceByIds(@RequestAttribute(value = Constants.SESSION_USER) User loginUser, |
|
|
|
@PathVariable long projectCode, |
|
|
|
@PathVariable long projectCode, |
|
|
|