update - 调整流程相关 Feign Api 地址
This commit is contained in:
parent
06bfcb8b54
commit
79ae087bc3
@ -21,18 +21,17 @@ import javax.validation.constraints.NotNull;
|
||||
* @author wangli
|
||||
* @since 2023/9/21 16:25
|
||||
*/
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine/api/process" +
|
||||
"/definition}")
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine}")
|
||||
public interface ProcessDefinitionApi {
|
||||
|
||||
|
||||
/**
|
||||
* 获取活跃的流程定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@GetMapping("/api/process/definition/page")
|
||||
CommonResponse<BpmPageResult<BpmnProcessDefinitionVO>> getProcessDefinitionPage(@Validated @RequestBody BpmnProcessDefinitionPageDTO dto);
|
||||
|
||||
@PutMapping("/update")
|
||||
@PutMapping("/api/process/definition/update")
|
||||
CommonResponse<Boolean> updateProcessDefinition(@Validated @RequestBody BpmnProcessDefinitionUpdateDTO dto);
|
||||
|
||||
/**
|
||||
@ -41,7 +40,7 @@ public interface ProcessDefinitionApi {
|
||||
* @param processDefinitionId 编号
|
||||
* @return 流程定义
|
||||
*/
|
||||
@GetMapping("/get")
|
||||
@GetMapping("/api/process/definition/get")
|
||||
CommonResponse<BpmnProcessDefinitionVO> getProcessDefinition(@NotBlank(message = "流程定义 ID 不能为空") @RequestParam String processDefinitionId);
|
||||
|
||||
|
||||
@ -51,7 +50,7 @@ public interface ProcessDefinitionApi {
|
||||
* @param deploymentId 部署编号
|
||||
* @return 流程定义
|
||||
*/
|
||||
@GetMapping("/getByDeploymentId")
|
||||
@GetMapping("/api/process/definition/getByDeploymentId")
|
||||
CommonResponse<BpmnProcessDefinitionVO> getProcessDefinitionByDeploymentId(
|
||||
@NotBlank(message = "流程部署 ID 不能为空") @RequestParam String deploymentId);
|
||||
|
||||
@ -62,7 +61,7 @@ public interface ProcessDefinitionApi {
|
||||
* @param key 流程定义的标识
|
||||
* @return 流程定义
|
||||
*/
|
||||
@GetMapping("/active/getByKey")
|
||||
@GetMapping("/api/process/definition/active/getByKey")
|
||||
CommonResponse<BpmnProcessDefinitionVO> getActiveProcessDefinitionByKey(@NotBlank(message = "模型定义KEY不能为空") @RequestParam String key);
|
||||
|
||||
|
||||
@ -72,7 +71,7 @@ public interface ProcessDefinitionApi {
|
||||
* 挂起:SuspensionState.SUSPENDED.getStateCode()
|
||||
* {@see SuspensionState}
|
||||
*/
|
||||
@PutMapping("/state/update")
|
||||
@PutMapping("/api/process/definition/state/update")
|
||||
CommonResponse<Boolean> getActiveProcessDefinitionByKey(@NotBlank(message = "流程定义ID不能为空") @RequestParam String processDefinitionId,
|
||||
@NotNull(message = "状态不能为空") @RequestParam Integer state);
|
||||
|
||||
@ -82,7 +81,7 @@ public interface ProcessDefinitionApi {
|
||||
*
|
||||
* @return 流程定义ID
|
||||
*/
|
||||
@GetMapping("/active/getByCategory")
|
||||
@GetMapping("/api/process/definition/active/getByCategory")
|
||||
CommonResponse<String> getActiveProcessDefinitionId(@NotBlank(message = "租户不能为空") @RequestParam String tenantId,
|
||||
@NotBlank(message = "分类不能为空") @RequestParam String category);
|
||||
}
|
||||
|
||||
@ -20,14 +20,13 @@ import javax.validation.constraints.NotNull;
|
||||
* @author wangli
|
||||
* @since 2023/9/21 16:26
|
||||
*/
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine/api/process" +
|
||||
"/instance}")
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine}")
|
||||
public interface ProcessInstanceApi {
|
||||
|
||||
/**
|
||||
* 我发起的审批列表
|
||||
*/
|
||||
@GetMapping("/page/my")
|
||||
@GetMapping("/api/process/instance/page/my")
|
||||
CommonResponse<BpmPageResult<BpmnProcessInstancePageItemVO>> getMyProcessInstancePage(@Validated @RequestBody BpmnProcessInstanceMyPageReqVO dto);
|
||||
|
||||
/**
|
||||
@ -41,10 +40,10 @@ public interface ProcessInstanceApi {
|
||||
*
|
||||
* @param dto {@link BpmnProcessInstanceCreateDTO}
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
@PostMapping("/api/process/instance/create")
|
||||
CommonResponse<String> createProcessInstance(@Validated @RequestBody BpmnProcessInstanceCreateDTO dto);
|
||||
|
||||
@PostMapping("/form/create")
|
||||
@PostMapping("/api/process/instance/form/create")
|
||||
CommonResponse<String> createProcessInstanceWith(@Validated @RequestBody BpmnProcessInstanceCreateWithFormDTO dto);
|
||||
|
||||
/**
|
||||
@ -59,7 +58,7 @@ public interface ProcessInstanceApi {
|
||||
* @param dto {@link BpmnProcessInstanceCancelDTO}
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/cancel")
|
||||
@DeleteMapping("/api/process/instance/cancel")
|
||||
CommonResponse<Boolean> cancelProcessInstance(@Validated @RequestBody BpmnProcessInstanceCancelDTO dto);
|
||||
|
||||
/**
|
||||
@ -68,7 +67,7 @@ public interface ProcessInstanceApi {
|
||||
* @param dto {@link BpmnProcessInstanceQueryDTO} 可根据 Id,BusinessKey进行查询
|
||||
* @return 流程实例, 租户Id不必传
|
||||
*/
|
||||
@GetMapping("/get")
|
||||
@GetMapping("/api/process/instance/get")
|
||||
CommonResponse<BpmnProcessInstanceVO> getProcessInstanceVO(@Validated @RequestBody BpmnProcessInstanceQueryDTO dto);
|
||||
|
||||
/**
|
||||
@ -78,11 +77,11 @@ public interface ProcessInstanceApi {
|
||||
* @param status 1, "active"; 2, "suspended"
|
||||
*/
|
||||
@Operation(summary = "更新指定流程定义的版本的状态, 处于 suspended 状态的流程模型将不能再发起实例")
|
||||
@PutMapping("/status/update")
|
||||
@PutMapping("/api/process/instance/status/update")
|
||||
CommonResponse<Boolean> updateProcessStatus(@NotBlank(message = "流程定义 ID 不能为空") @RequestParam String processDefinitionId,
|
||||
@NotNull(message = "状态不能为空") @RequestParam Integer status);
|
||||
|
||||
@GetMapping("/graphical")
|
||||
@GetMapping("/api/process/instance/graphical")
|
||||
CommonResponse<ObjectNode> processInstanceGraphical(@NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
|
||||
|
||||
@ -20,12 +20,11 @@ import javax.validation.constraints.NotBlank;
|
||||
* @author wangli
|
||||
* @since 2023/9/21 15:47
|
||||
*/
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine/api/process" +
|
||||
"/model}")
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine}")
|
||||
public interface ProcessModelApi {
|
||||
|
||||
@Operation(summary = "流程模型列表")
|
||||
@GetMapping("/page")
|
||||
@GetMapping("/api/process/model/page")
|
||||
CommonResponse<BpmPageResult<FormModelBaseVO>> page(@Validated @RequestBody BpmnModelSearchDTO dto);
|
||||
|
||||
/**
|
||||
@ -33,14 +32,14 @@ public interface ProcessModelApi {
|
||||
* return modelId的主键
|
||||
*/
|
||||
@Operation(summary = "创建流程模型")
|
||||
@PostMapping("/create")
|
||||
@PostMapping("/api/process/model/create")
|
||||
CommonResponse<String> create(@Validated @RequestBody BpmnModelCreateDTO dto);
|
||||
|
||||
/**
|
||||
* 获取模型
|
||||
*/
|
||||
@Operation(summary = "通过模型ID查询指定流程模型")
|
||||
@GetMapping("/get")
|
||||
@GetMapping("/api/process/model/get")
|
||||
CommonResponse<BpmnModelDetailVO> getById(@NotBlank(message = "流程模型 ID 不能为空") @RequestParam String processModelId,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
|
||||
@ -49,7 +48,7 @@ public interface ProcessModelApi {
|
||||
* 获取模型
|
||||
*/
|
||||
@Operation(summary = "通过模型KEY查询指定流程模型")
|
||||
@GetMapping("/getByKey")
|
||||
@GetMapping("/api/process/model/getByKey")
|
||||
CommonResponse<BpmnModelDetailVO> getByKey(@NotBlank(message = "流程模型 KEY 不能为空") @RequestParam String processModelKey,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
|
||||
@ -57,7 +56,7 @@ public interface ProcessModelApi {
|
||||
* 修改流程信息
|
||||
*/
|
||||
@Operation(summary = "更新流程模型")
|
||||
@PutMapping("/update")
|
||||
@PutMapping("/api/process/model/update")
|
||||
CommonResponse<String> update(@RequestBody BpmnModelUpdateDTO dto);
|
||||
|
||||
|
||||
@ -66,7 +65,7 @@ public interface ProcessModelApi {
|
||||
* return 部署完成的流程定义Id
|
||||
*/
|
||||
@Operation(summary = "通过模型 ID 部署流程模型")
|
||||
@PostMapping("/deploy")
|
||||
@PostMapping("/api/process/model/deploy")
|
||||
CommonResponse<String> deployById(@NotBlank(message = "流程模型 ID 不能为空") @RequestParam(required = false) String processModelId,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam(required = false) String tenantId);
|
||||
|
||||
@ -76,12 +75,12 @@ public interface ProcessModelApi {
|
||||
* return 部署完成的流程定义Id
|
||||
*/
|
||||
@Operation(summary = "通过模型 KEY 部署流程模型")
|
||||
@PostMapping("/deployByKey")
|
||||
@PostMapping("/api/process/model/deployByKey")
|
||||
CommonResponse<String> deployByKey(@NotBlank(message = "流程模型 KEY 不能为空") @RequestParam(required = false) String processModelKey,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam(required = false) String tenantId);
|
||||
|
||||
@Operation(summary = "通过模块 ID 取消部署流程模型")
|
||||
@PostMapping("/undeploy")
|
||||
@PostMapping("/api/process/model/undeploy")
|
||||
CommonResponse<Void> unDeployById(@NotBlank(message = "流程模型 ID 不能为空") @RequestParam(required = false) String processModelId,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam(required = false) String tenantId);
|
||||
|
||||
@ -89,12 +88,12 @@ public interface ProcessModelApi {
|
||||
* 删除模型
|
||||
*/
|
||||
@Operation(summary = "删除指定模型 ID 的流程模型")
|
||||
@DeleteMapping("/delete")
|
||||
@DeleteMapping("/api/process/model/delete")
|
||||
CommonResponse<Void> deleteById(@NotBlank(message = "流程模型 ID 不能为空") @RequestParam String processModelId,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
|
||||
@Operation(summary = "删除指定模型 KEY 的流程模型")
|
||||
@DeleteMapping("/deleteByKey")
|
||||
@DeleteMapping("/api/process/model/deleteByKey")
|
||||
CommonResponse<Void> deleteByKey(@NotBlank(message = "流程模型 KEY 不能为空") @RequestParam String processModelKey,
|
||||
@NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
}
|
||||
|
||||
@ -25,21 +25,20 @@ import java.util.List;
|
||||
* @author wangli
|
||||
* @since 2023/9/21 16:26
|
||||
*/
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine/api/process" +
|
||||
"/task}")
|
||||
@FeignClient(name = "workflowEngine", url = "${axzo.service.workflowEngine:http://workflowEngine}")
|
||||
public interface ProcessTaskApi {
|
||||
|
||||
|
||||
/**
|
||||
* 待审核列表
|
||||
*/
|
||||
@GetMapping("/page/todo")
|
||||
@GetMapping("/api/process/task/page/todo")
|
||||
CommonResponse<BpmPageResult<BpmnTaskTodoPageItemVO>> getTodoTaskPage(@Validated @RequestBody BpmnTaskPageSearchDTO dto);
|
||||
|
||||
/**
|
||||
* 已完成的审批列表
|
||||
*/
|
||||
@GetMapping("/page/done")
|
||||
@GetMapping("/api/process/task/page/done")
|
||||
CommonResponse<BpmPageResult<BpmnTaskDonePageItemVO>> getDoneTaskPage(@Validated @RequestBody BpmnTaskPageSearchDTO dto);
|
||||
|
||||
/**
|
||||
@ -53,7 +52,7 @@ public interface ProcessTaskApi {
|
||||
* 2.2. 流程实例正常结束会触发 process-instance-completed 事件
|
||||
* </pre>
|
||||
*/
|
||||
@PutMapping("/approve")
|
||||
@PutMapping("/api/process/task/approve")
|
||||
CommonResponse<Boolean> approveTask(@Validated(ValidGroup.Insert.class) @RequestBody BpmnTaskAuditDTO dto);
|
||||
|
||||
/**
|
||||
@ -65,7 +64,7 @@ public interface ProcessTaskApi {
|
||||
* 2. 当前流程实例会触发 process-instance-rejected 事件
|
||||
* </pre>
|
||||
*/
|
||||
@PutMapping("/reject")
|
||||
@PutMapping("/api/process/task/reject")
|
||||
CommonResponse<Boolean> rejectTask(@Validated(ValidGroup.Update.class) @RequestBody BpmnTaskAuditDTO dto);
|
||||
|
||||
/**
|
||||
@ -75,7 +74,7 @@ public interface ProcessTaskApi {
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "直接修改审批任务的审批人")
|
||||
@PutMapping("/assignee")
|
||||
@PutMapping("/api/process/task/assignee")
|
||||
CommonResponse<Boolean> assigneeTask(@Validated @RequestBody BpmnTaskAssigneeDTO dto);
|
||||
|
||||
/**
|
||||
@ -83,7 +82,7 @@ public interface ProcessTaskApi {
|
||||
* <p>
|
||||
* 同一层级结构
|
||||
*/
|
||||
@GetMapping("/list/flat")
|
||||
@GetMapping("/api/process/task/list/flat")
|
||||
CommonResponse<List<BpmnHistoricTaskInstanceVO>> getTaskListFlatByProcessInstanceId(@NotBlank(message = "流程实例 ID " +
|
||||
"不能为空") @RequestParam String processInstanceId, @NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
|
||||
@ -92,14 +91,14 @@ public interface ProcessTaskApi {
|
||||
* <p>
|
||||
* 分组结构
|
||||
*/
|
||||
@GetMapping("/list/group")
|
||||
@GetMapping("/api/process/task/list/group")
|
||||
CommonResponse<List<BpmnHistoricTaskInstanceGroupVO>> getTaskListGroupByProcessInstanceId(@NotBlank(message =
|
||||
"流程实例 ID 不能为空") @RequestParam String processInstanceId, @NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
|
||||
/**
|
||||
* 获取实例正在审核的人列表
|
||||
*/
|
||||
@GetMapping("/active/list")
|
||||
@GetMapping("/api/process/task/active/list")
|
||||
CommonResponse<List<BpmnTaskInstanceVO>> getActiveTasksByProcessInstanceId(@NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId, @NotBlank(message = "租户不能为空") @RequestParam String tenantId);
|
||||
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ import javax.validation.constraints.NotNull;
|
||||
import static cn.azxo.framework.common.model.CommonResponse.success;
|
||||
|
||||
@Slf4j
|
||||
@RequestMapping("/web/v1/api/process/definition")
|
||||
@RequestMapping({"/web/v1/api/process/definition", "/api/process/definition"})
|
||||
@RestController
|
||||
@Validated
|
||||
public class BpmnProcessDefinitionController implements ProcessDefinitionApi {
|
||||
|
||||
@ -25,7 +25,7 @@ import static cn.axzo.workflow.core.common.enums.BpmErrorCode.PROCESS_OPERATION_
|
||||
import static cn.azxo.framework.common.model.CommonResponse.success;
|
||||
|
||||
@Slf4j
|
||||
@RequestMapping("/web/v1/api/process/instance")
|
||||
@RequestMapping({"/web/v1/api/process/instance", "/api/process/instance"})
|
||||
@RestController
|
||||
@Validated
|
||||
public class BpmnProcessInstanceController implements ProcessInstanceApi {
|
||||
|
||||
@ -23,7 +23,7 @@ import static cn.azxo.framework.common.model.CommonResponse.success;
|
||||
|
||||
@Tag(name = "运维管理 - 流程模型")
|
||||
@Slf4j
|
||||
@RequestMapping("/web/v1/api/process/model")
|
||||
@RequestMapping({"/web/v1/api/process/model", "/api/process/model"})
|
||||
@RestController
|
||||
@Validated
|
||||
public class BpmnProcessModelController implements ProcessModelApi {
|
||||
|
||||
@ -22,7 +22,7 @@ import java.util.List;
|
||||
import static cn.azxo.framework.common.model.CommonResponse.success;
|
||||
|
||||
@Slf4j
|
||||
@RequestMapping("/web/v1/api/process/task")
|
||||
@RequestMapping({"/web/v1/api/process/task", "/api/process/task"})
|
||||
@RestController
|
||||
@Validated
|
||||
public class BpmnTaskController implements ProcessTaskApi {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user