Repository navigation
feat: 流程设计页支持强制同步运行中实例 (#281) - #81
Merged
Merged
Conversation
- 设计页头部新增「强制同步」入口,弹窗分页展示当前流程编码的运行中实例,支持跨页多选; - 新增运行中实例查询与强制同步接口封装(GET /api/query/record/running、 POST /api/cmd/record/forceSync); - 补充同步成功、未选择实例的提示文案; - 新增选择结果去重与空值过滤单元测试。 Closes #281
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
关联后端 issue/PR:codingapi/flow-engine#281 / codingapi/flow-engine#282
流程设计页需要提供「把最新设计强制同步到运行中实例」的入口:只同步勾选的实例,未勾选的实例继续使用原运行时快照;后端会校验结构一致性。
改动
design-panel/layout/header.tsx)在「重置流程」后新增「强制同步」按钮;components/design-sync-instance:弹窗内分页表格展示当前流程编码下的运行中实例(标题 / 发起人 / 创建时间),支持跨页多选,未选择时提示;api/workflow.ts):GET /api/query/record/running?workCode=¤t=&pageSize=(分页查询运行中实例)POST /api/cmd/record/forceSync(workCode+ 选中的processIds)flow-core/message.ts新增DESIGN_FORCE_SYNC_SUCCESS/DESIGN_FORCE_SYNC_NO_SELECTED文案;selection.ts与单元测试:选中实例按processId去重、过滤空值。交互说明
弹窗顶部提示:同步使用已保存的最新设计;仅勾选实例改用新配置;新增/删除节点、调整节点顺序、删除已有按钮时后端会拒绝同步并返回原因。
验证
packages/flow-design:npx rstest run→ 14 个测试文件、43 个用例全部通过(含新增 4 例);packages/flow-design:npx tsc -p tsconfig.json --noEmit→ 0 error;rslib build在本地被 IDE 的 node-safe-delete shim 拦截(--file parameter is required,dev分支同样复现),未能完成打包验证。