[PR #28012] fix(workflow): validate node compatibility when importing dsl between chatflows and workflows #31920

Closed
opened 2026-02-21 20:50:24 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/28012

State: closed
Merged: Yes


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

fix #24883

  • Use js-yaml to parse dsl content, and validate node compatibility when importing dsl between chatflows and workflows in the frontend. The valid nodes include:
    valid nodes

Screenshots

Before

  • import workflow with end node

https://github.com/user-attachments/assets/85fb041a-7694-4dca-acc9-6b090fbc7bb9

  • import workflow with trigger node, however these trigger features are only available for workflows
import trigger  abnormal

After

  • import workflow without end/trigger node

https://github.com/user-attachments/assets/c4a40729-9920-484a-9b87-afe0ec2d60f9

  • import workflow with end/trigger node

https://github.com/user-attachments/assets/298fe81f-e667-478d-abcd-6ec2afd96d6b

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/28012 **State:** closed **Merged:** Yes --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 1. Ensure there is an associated issue and you have been assigned to it > 1. Use the correct syntax to link this PR: `Fixes #<issue number>`. ## Summary fix #24883 - Use js-yaml to parse dsl content, and validate node compatibility when importing dsl between chatflows and workflows in the frontend. The valid nodes include: <img width="1394" height="470" alt="valid nodes" src="https://github.com/user-attachments/assets/74b4305a-0304-4207-8601-b57b3e6a0a4e" /> ## Screenshots ### Before - import workflow with end node https://github.com/user-attachments/assets/85fb041a-7694-4dca-acc9-6b090fbc7bb9 - import workflow with trigger node, however these trigger features are only available for workflows <img width="1439" height="758" alt="import trigger abnormal" src="https://github.com/user-attachments/assets/71d0f99e-7c65-4a0c-9ba0-1a60b6869755" /> ### After - import workflow without end/trigger node https://github.com/user-attachments/assets/c4a40729-9920-484a-9b87-afe0ec2d60f9 - import workflow with end/trigger node https://github.com/user-attachments/assets/298fe81f-e667-478d-abcd-6ec2afd96d6b ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:50:24 -05:00
yindo closed this issue 2026-02-21 20:50:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31920