Enhanced Control Structures for More Complex Workflow Logic #2435

Closed
opened 2026-02-21 17:45:43 -05:00 by yindo · 0 comments
Owner

Originally created by @h-yuske-kishimoto on GitHub (Apr 22, 2024).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing?

When using Dify's workflow as an API, I often encounter complex logic that requires numerous IF/ELSE blocks. This can be cumbersome and inefficient, especially for larger projects.

2. Describe the feature you'd like to see

I propose the addition of "SWITCH" and "FOR" processing features to Dify's workflow. The "SWITCH" feature would allow for multiple outputs by defining multiple conditions for input values. The "FOR" feature would execute a specified number of times and have the ability to break at any time. This suggestion is inspired by the functionality of Node-RED, a JS workflow engine.

3. How will this feature improve your workflow or experience?

The addition of these features would allow for the creation of more powerful and versatile agents and workflows. This would greatly enhance the user experience and efficiency when dealing with complex logic in Dify.

4. Additional context or comments

For a visual representation of the proposed features, please refer to Node-RED's user guide: https://nodered.jp/docs/user-guide/nodes

5. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @h-yuske-kishimoto on GitHub (Apr 22, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Pleas do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? When using Dify's workflow as an API, I often encounter complex logic that requires numerous IF/ELSE blocks. This can be cumbersome and inefficient, especially for larger projects. ### 2. Describe the feature you'd like to see I propose the addition of "SWITCH" and "FOR" processing features to Dify's workflow. The "SWITCH" feature would allow for multiple outputs by defining multiple conditions for input values. The "FOR" feature would execute a specified number of times and have the ability to break at any time. This suggestion is inspired by the functionality of Node-RED, a JS workflow engine. ### 3. How will this feature improve your workflow or experience? The addition of these features would allow for the creation of more powerful and versatile agents and workflows. This would greatly enhance the user experience and efficiency when dealing with complex logic in Dify. ### 4. Additional context or comments For a visual representation of the proposed features, please refer to Node-RED's user guide: https://nodered.jp/docs/user-guide/nodes ### 5. Can you help us with this feature? - [X] I am interested in contributing to this feature.
yindo added the 💪 enhancement🌊 feat:workflow labels 2026-02-21 17:45:43 -05:00
yindo closed this issue 2026-02-21 17:45:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#2435