refactor(bpm): 优化流程实例创建逻辑

- 移除了在 BpmProcessInstanceServiceImpl 中更新流程实例拓展的操作
- 在创建监听类中更新流程实例拓展,以避免事务执行顺序导致的插入失败
This commit is contained in:
aikai 2025-07-08 12:33:09 +08:00
parent d91365ca0b
commit b749df74b5

View File

@ -565,6 +565,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
// 设置流程审批部门缓存
stringRedisTemplate.opsForValue().set("assignee_dept_" + instance.getId(), startUser.getDeptId().toString());
// 这边不再更新流程实例拓展直接从创建的监听类中更新 - 避免事物执行顺序导致插入失败
return instance.getId();
}