fix 修复 多次驳回无法锁定审批人问题

This commit is contained in:
疯狂的狮子Li
2026-05-28 09:38:27 +08:00
parent b5da5f30c9
commit 7c7c8a7564
@@ -161,9 +161,11 @@ public class WorkflowGlobalListener implements GlobalListener {
List<String> userIdList = StringUtils.str2List(userIds, StringUtils.SEPARATOR, true, true);
if (CollUtil.isNotEmpty(userIdList)) {
flowTask.setPermissionList(userIdList);
// 移除已处理的状态变量
variable.remove(nodeKey);
FlowEngine.insService().removeVariables(flowTask.getInstanceId(), nodeKey);
if (TaskStatusEnum.PASS.getStatus().equals(taskStatus)) {
// 办理指定人变量只消费一次;驳回指定人变量需要保留给后续重复驳回。
variable.remove(nodeKey);
FlowEngine.insService().removeVariables(flowTask.getInstanceId(), nodeKey);
}
}
}