- 多出口:FlwTask 增 edge_name 列(sql/20260916),FlwTaskRepository.claimAndFinish
同步落列;FlowTaskService.handle 出度>1 时 edgeName 必填;FlowEngine.continueAdvance
按 edge name 选路(单出口原路径逐字节兼容,未命中不推进);FlowAdvanceService/
FlowNodeAdvanceListener 透传;BranchScope 从 FlowEngine 提取
- DefValidator:多出口出口命名必填且同节点唯一;跨分支连线发布期明确拒绝
- 退回 POST /task/{id}/returnBack:默认退主管线最近已批节点,精确失效当前节点待办,
split 幂等 upsert 使退回重走并行段不撞 flw_branch uk
- 移交 POST /task/{id}/transfer:TRANSFERRED(5)+新建待办,AssigneeResolver.requireUserName
- 或签 ANY 补齐:首个同意失效同节点兄弟待办
- 已办口径/撤回守卫:status in (1,2,4,5);新事件 flow.returned/flow.transferred
- FlowDiagramService:EdgeVo.name/NodeVo.state/DiagramVo.layout,办件图状态计算
- 新 IT:多出口×3、ANY 或签、退回重走并行段、退回/移交/撤回
mvn test 84/84 绿
This commit is contained in:
@@ -81,12 +81,13 @@ public class FlowUserController {
|
||||
return queryService.detail(schId, instance.getId(), user.getId());
|
||||
}
|
||||
|
||||
/** 同意(opinion 可选)——一切审批入口的收敛点 */
|
||||
/** 同意(opinion 可选;多出口节点必须带 edgeName=所选出口名,单出口可省)——一切审批入口的收敛点 */
|
||||
@PostMapping("/task/{id}/approve")
|
||||
public void approve(BoaUser user, @PathVariable("id") Long id,
|
||||
@RequestBody(required = false) Map<String, String> body) {
|
||||
String opinion = body == null ? null : body.get("opinion");
|
||||
taskService.handle(requireSchId(user), id, true, opinion, user.getId());
|
||||
String edgeName = body == null ? null : body.get("edgeName");
|
||||
taskService.handle(requireSchId(user), id, true, opinion, user.getId(), edgeName);
|
||||
}
|
||||
|
||||
/** 拒绝(opinion 必填) */
|
||||
@@ -97,6 +98,26 @@ public class FlowUserController {
|
||||
taskService.handle(requireSchId(user), id, false, opinion, user.getId());
|
||||
}
|
||||
|
||||
/** 退回(targetNodeId 可选=缺省回最近已办节点;opinion 可选) */
|
||||
@PostMapping("/task/{id}/returnBack")
|
||||
public void returnBack(BoaUser user, @PathVariable("id") Long id,
|
||||
@RequestBody(required = false) Map<String, String> body) {
|
||||
String targetNodeId = body == null ? null : body.get("targetNodeId");
|
||||
String opinion = body == null ? null : body.get("opinion");
|
||||
taskService.returnBack(requireSchId(user), id, targetNodeId, opinion, user.getId());
|
||||
}
|
||||
|
||||
/** 移交(toUserId 必填;reason 可选) */
|
||||
@PostMapping("/task/{id}/transfer")
|
||||
public void transfer(BoaUser user, @PathVariable("id") Long id,
|
||||
@RequestBody Map<String, Object> body) {
|
||||
Integer toUserId = body.get("toUserId") == null ? null
|
||||
: Integer.valueOf(String.valueOf(body.get("toUserId")));
|
||||
Object reason = body.get("reason");
|
||||
taskService.transfer(requireSchId(user), id, toUserId,
|
||||
reason == null ? null : String.valueOf(reason), user.getId());
|
||||
}
|
||||
|
||||
/** 撤回(提交人;仅尚无任务被办理时) */
|
||||
@PostMapping("/instance/{id}/withdraw")
|
||||
public void withdraw(BoaUser user, @PathVariable("id") Long id) {
|
||||
|
||||
Reference in New Issue
Block a user