feat(data_export): add workflow support for data export #784#602
Merged
feat(data_export): add workflow support for data export #784#602
Conversation
DEV-015: Add AuditWorkflowAndAdvanceStep method to the WorkflowRepo interface and its storage implementation. This method atomically updates the current step state and advances CurrentWorkflowStepId to the next step within a transaction, providing the foundation for multi-step approval in data export workflows. refs actiontech/dms-ee#784 (cherry picked from commit 35fb0dae38f6da94d3ef6af78eb11d2e6b9ed235)
The version column (size:64) was too small for dev branch names like "feat/784-data-export-workflow-template <40-char-hash>" (79+ chars), causing auto-migration to fail with "Data truncated" error and preventing DMS from starting. (cherry picked from commit f1fd24ed15b5d2af88bdc6dca9e98922c42d08db)
When a data export workflow has no approval steps (CurrentWorkflowStepId=0, WorkflowSteps=[]), the list and global list endpoints would panic with "index out of range" when trying to access WorkflowSteps[CurrentWorkflowStepId-1]. Add bounds checks to prevent this panic, consistent with the webhook fix in the previous commit. (cherry picked from commit 0e8ba22932da83133602d7bdea8c126064d0f60e)
…rt status When data export workflow enters wait_for_export or exporting status, display the workflow creator as the current step assignee user in the list endpoint, since the export executor is always the workflow creator. (cherry picked from commit 06b2a1f3db3b44698ba3407d230df98c36453343)
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
iwanghc
approved these changes
Apr 24, 2026
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.
User description
Summary
AuditWorkflowAndAdvanceStepto WorkflowRepo for data export workflow audit operationsCurrentWorkflowStepIdin list endpoints to prevent index out of rangewait_for_exportstatusRelated: https://github.com/actiontech/dms-ee/issues/784
Description
新增 "AuditWorkflowAndAdvanceStep" 接口实现
修改数据导出工作流中待操作人显示逻辑
扩大 "ProxyTarget" 版本字段长度到 512
优化事务处理与错误反馈
Diagram Walkthrough
File Walkthrough
data_export_workflow.go
新增审批流程原子更新接口internal/dms/biz/data_export_workflow.go
workflow.go
添加事务处理的审批更新实现internal/dms/storage/workflow.go
data_export_workflow.go
优化待操作人状态显示逻辑internal/dms/service/data_export_workflow.go
model.go
更新ProxyTarget版本字段长度internal/dms/storage/model/model.go