feat: wire process form removal actions
This commit is contained in:
@@ -206,6 +206,16 @@ public class FlowableClient {
|
||||
comment == null ? Map.of() : Map.of("comment", comment), Map.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除已结束历史流程实例。对应 flowable-service
|
||||
* {@code POST /api/flow/process/{processInstanceId}/delete-history}。
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, Object> deleteHistoricProcessInstance(String processInstanceId) {
|
||||
return post("删除历史流程", "/api/flow/process/" + processInstanceId + "/delete-history",
|
||||
Map.of(), Map.class);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- 内部:重试 + 异常分类
|
||||
|
||||
private List<FlowTaskDto> get(String op, java.util.function.Function<UriBuilder, java.net.URI> uriFn) {
|
||||
|
||||
@@ -213,6 +213,20 @@ public class TodoController {
|
||||
return ResponseEntity.ok(resp);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除已结束历史流程实例",
|
||||
description = "审批表单删除页专用:透传 flowable-service delete-history。仅已结束流程允许删除,运行中流程由引擎返回 409。")
|
||||
@PostMapping("/api/workflow/process/{processInstanceId}/delete-history")
|
||||
public ResponseEntity<Map<String, Object>> deleteHistoricProcess(@PathVariable String processInstanceId) {
|
||||
Map<String, Object> engine = flowableClient.deleteHistoricProcessInstance(processInstanceId);
|
||||
Map<String, Object> resp = new LinkedHashMap<>();
|
||||
resp.put("status", 0);
|
||||
resp.put("msg", "删除成功");
|
||||
resp.put("deleted", true);
|
||||
resp.put("processInstanceId", processInstanceId);
|
||||
resp.put("businessKey", rowString(engine, "businessKey", "BUSINESSKEY"));
|
||||
return ResponseEntity.ok(resp);
|
||||
}
|
||||
|
||||
@Operation(summary = "流程轨迹", description = "返回流程实例的历史任务节点(含当前活动节点),按开始时间升序;包含办理人姓名/审批意见/办理结果")
|
||||
@GetMapping("/api/flow/process/{processInstanceId}/trace")
|
||||
public ResponseEntity<List<TraceNodeDto>> trace(@PathVariable String processInstanceId) {
|
||||
|
||||
Reference in New Issue
Block a user