Repository navigation
feat: add workflow tag management and enable tag-based execution for workflows and chatflows - #23827
Closed
qiaofenlin wants to merge 213 commits into
Closed
qiaofenlin wants to merge 213 commits into
qiaofenlin wants to merge 213 commits into
Conversation
qiaofenlin
force-pushed
the
feature/workflow-alias-management
branch
from
August 12, 2025 14:54
cf6753a to
3b74a69
Compare
qiaofenlin
force-pushed
the
feature/workflow-alias-management
branch
7 times, most recently
from
August 13, 2025 05:22
a52cd87 to
b6eb424
Compare
- Add workflow alias management functionality with CRUD operations - Implement batch query support for efficient alias retrieval - Optimize cache strategy to reduce network requests - Add alias management UI components and modal dialogs - Support system and custom alias types (production, staging, etc.) - Add comprehensive i18n support for multiple languages - Include database migrations and model definitions - Add unit tests and integration tests for alias functionality - Clean up unused code and improve maintainability
qiaofenlin
force-pushed
the
feature/workflow-alias-management
branch
from
August 13, 2025 05:34
05633af to
f36fef1
Compare
laipz8200
requested changes
Aug 14, 2025
…back
- Use StrEnum instead of Enum for AliasType
- Remove explicit primary key constraint naming
- Use mapped_column index parameter for single field indexes
- Optimize identifier resolution priority (UUID > alias)
- Simplify validation logic by removing redundant checks
- Update API docs to reflect correct priority order
qiaofenlin
force-pushed
the
feature/workflow-alias-management
branch
from
August 15, 2025 04:38
dc38953 to
b975e51
Compare
laipz8200
requested changes
Aug 17, 2025
- Replace bulk loading with pagination for better performance - Use Pydantic models for parameter validation and error handling - Implement infinite query pattern for frontend data fetching - Standardize pagination logic across the application - Optimize default limits for production use
…e/workflow-alias-management # Conflicts: # web/app/components/workflow/nodes/_base/hooks/use-toggle-expend.ts
Contributor
|
I’m really looking forward to this feature. |
added 3 commits
January 16, 2026 17:38
- Resolved merge conflicts - Updated workflow alias feature to work with latest main - Migrated i18n from .ts to .json format
- Changed down_revision from d57accd375ae to 3334862ee907 - Removed unnecessary merge migration file
- Add validation for workflow_id/workflow_alias in chat-messages endpoint - Return 400 BadRequest instead of 404/500 for invalid workflow identifiers - Verify workflow existence when UUID format is valid - Fix i18n translation calls in alias-management-modal and use-context-menu - Add missing fetchWorkflowRunHistory export in service/workflow.ts
- Move tag.* entries to correct alphabetical position - Unify Chinese translations from '别名' to '标签' - Remove duplicate tag entries at end of file
- Rename add_workflow_alias_management to add_workflow_tag_management - Remove separate rename migration file (a7b3c9d2e1f4) - Create workflow_name_tags table directly instead of creating and renaming
- Fix antfu/if-newline errors by adding newlines after if statements - Fix react-hooks-extra/no-direct-set-state-in-use-effect by using setTimeout - Fix ts/no-explicit-any errors by replacing 'any' with 'unknown' type Files modified: - web/app/components/workflow-app/hooks/use-workflow-init.ts - web/app/components/workflow-app/components/workflow-header/index.tsx - web/app/components/workflow/panel/version-history-panel/tag-management-modal/index.tsx Result: 0 errors, 1523 warnings (warnings only, no blocking errors)
Member
|
Thank you for your contribution! However, this PR appears to be outdated, so I will be closing it. If you still need this change, please feel free to resubmit a new PR. |
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.
Important
Fixes #<issue number>.Fixes #23639
Summary
Note
We believe this feature will greatly improve workflow management in enterprise-scale and multi-user collaboration scenarios.
This PR is open to discussion and we are happy to adjust the implementation based on feedback to ensure maximum compatibility and usability.
This PR implements a comprehensive workflow alias management system that enhances the extensibility of Dify's workflow execution capabilities. The implementation consists of two main components:
1. Workflow Alias Management System
workflow_aliasestable with tenant_id, app_id, workflow_id, alias_name and alias_type fields2. Alias-Based Workflow & Chatflow Execution Update
2.1 Execution Mode Separation
/workflows/:identifier/runnow supports both workflow_id and Alias execution modes/chat-messagesnow accepts a newworkflow_aliasparameter to trigger Chatflow by alias2.2 Unified Endpoint Enhancement
/chat-messagesflow while keeping the original interface functionalMotivation
Problem Statement
Although Dify supports version history, it currently lacks structured support for multi-environment workflows (e.g., development / testing / release).
In enterprise-scale applications, this limitation can create challenges in collaboration, quality assurance, and safe deployment.
Potential issues in enterprise use cases:
This leads to slow iterations, duplicated efforts, and deployment errors.
Solution
We propose adding workflow aliases that can control workflow routing, environment binding, and trigger automations.
✅ Key Features:
production,staging) are unique per app and cannot be deleted to prevent production disruption, but can be reassigneddev,feature-xxx) support full CRUD operations and are unique per appproductionalias)/workflows/:identifier/run): Aliases have higher priority thanworkflow_id. If both are empty, returns 400 error/chat-messages): Aliases have higher priority thanworkflow_id. If both are empty, uses latest published workflow🎯 Benefits:
Key Features
Technical Implementation
WorkflowAliasServicefor alias management operationsScreenshots
UI Components
Version History Panel
Alias List View

Workflow Execution Examples
Executing by Alias


Executing by Workflow ID
doc
Chatflow Execution Examples
Executing by Alias


Executing by Workflow ID
doc
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods