Skip to content

Dev - #277

Merged
xlorne merged 11 commits into
mainfrom
dev
Nov 16, 2026
Merged

Dev#277
xlorne merged 11 commits into
mainfrom
dev

Conversation

@xlorne

@xlorne xlorne commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

- FlowContent 新增 backNodes:只包含当前记录真实执行过的历史节点,
  倒序去重保证"最近经过的节点"优先(停留在 C 时为 B、A),
  且没有候选时不向展示按钮集合下发 RETURN,修正开始节点
  "退回按钮可点但提交必然失败"的错误交互(issue #270)
- BackNodeHelper 新增 historyBackNodes,按记录 id 正序倒序遍历历史记录,
  同一节点多次执行只保留最近一次,未执行的分支节点天然被排除
- ActionManager 收紧 RETURN 校验:开始节点不支持退回;
  退回目标必须存在于当前记录的历史执行链(并行/条件分支中
  "结构上不是下游但从未执行"的节点同样被拒绝)
- FlowStateException 新增 nodeNotSupportReturn / backNodeNotInHistory
- BaseAction.show 兼容缺少 display 配置的旧流程数据,避免详情接口空指针
- 新增 FlowIssue270ReturnNodeControlTest(历史候选、最近优先、未执行分支拒绝、开始节点)

Closes #270
…control

fix: 退回候选节点改为基于执行历史并收紧退回校验 (#270)
- 新增 FlowReissueService:仅流程管理员可对已正常完成(FINISH)的流程执行二次发起
- 复制源流程表单数据通过标准创建流程重新发起,新流程停在开始节点成为原发起人的待办,
  不自动提交;源流程记录、待办与历史记录不做任何改写
- 新增关系记录 FlowReissueRecord / t_flow_record_reissue 及仓储(JPA + Mock)与达梦序列
- 新增 FlowRecordReissueEvent,供业务方同步已落库数据状态
- 详情接口新增 reissue 标识,新增 POST /api/cmd/record/reissue
- 补充单元测试与集成文档

Closes #272
- 新增 IFlowEventPublisher SPI 与 FlowEventPublisher 门面;IFlowEvent 增加 eventKey() 分区键(默认 processId)
- 引擎内全部事件推送点由 EventPusher 收敛到 FlowEventPublisher,未注册实现时自动回退,行为不变
- starter 新增 SpringFlowEventPublisher:事务 afterCommit 投递(回滚不投递)、按 eventKey 分区单线程串行、
  同步执行 handler 以获得确定顺序、单 handler 异常不影响后续事件
- 新增配置 codingapi.flow.event.ordered(默认开启)
- 补充发布门面与发布器单元测试,更新事件集成文档与 AGENTS.md

Closes #274
feat: 已完成流程支持二次发起 (framework + infra + api)
feat: 流程事件统一走 FlowEventPublisher,保证提交后投递与按流程串行
- FlowReissueService 改走 FlowEventPublisher,避免绕过 #274 的「提交后投递 + 按流程串行」保障
- FlowRecordReissueEvent 实现 eventKey(),按二次发起后的新流程id分区
- 补充回归测试(事件必须经由发布器投递且带分区键)
- 更新事件集成文档与 AGENTS.md:10 种事件、推送位置、顺序与可见性说明

Refs #272, #274
- codingapi.framework.version 17.3.2 -> 17.3.3(含 #222 异步事件顺序与可见性修复)
- 新增 SpringFlowEventPublisherIntegrationTest:真实 Spring 上下文 + 真实事务同步,
  验证「提交后投递、同流程严格顺序、回滚不投递、无事务立即投递、handler 运行在事件分区线程」
- 升级后全量测试通过

Refs #274
@xlorne
xlorne merged commit 365f911 into main Nov 16, 2026
4 checks passed
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.61146% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.34%. Comparing base (eeba200) to head (c3cf271).
⚠️ Report is 70 commits behind head on main.

Files with missing lines Patch % Lines
...odingapi/flow/service/impl/FlowReissueService.java 71.42% 11 Missing and 11 partials ⚠️
...fra/repository/impl/FlowReissueRepositoryImpl.java 0.00% 16 Missing ⚠️
...mock/repository/FlowReissueRepositoryMockImpl.java 50.00% 6 Missing and 2 partials ⚠️
...codingapi/flow/event/SpringFlowEventPublisher.java 83.33% 5 Missing and 3 partials ⚠️
...flow/infra/convert/FlowReissueRecordConvertor.java 82.75% 3 Missing and 2 partials ⚠️
...odingapi/flow/pojo/request/FlowReissueRequest.java 55.55% 2 Missing and 2 partials ⚠️
...gapi/flow/api/controller/FlowRecordController.java 0.00% 4 Missing ⚠️
...com/codingapi/flow/node/helper/BackNodeHelper.java 85.00% 0 Missing and 3 partials ⚠️
...java/com/codingapi/flow/manager/ActionManager.java 85.71% 1 Missing and 1 partial ⚠️
...ain/java/com/codingapi/flow/action/BaseAction.java 0.00% 0 Missing and 1 partial ⚠️
... and 13 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #277      +/-   ##
============================================
- Coverage     74.58%   74.34%   -0.25%     
- Complexity     1871     1942      +71     
============================================
  Files           238      263      +25     
  Lines          7670     7990     +320     
  Branches        895      925      +30     
============================================
+ Hits           5721     5940     +219     
- Misses         1510     1584      +74     
- Partials        439      466      +27     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant