[PR #24844] fix: loop node doesn't exit when it react the condition #24717 #30817

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

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

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

Fixes #24717
Fixes #24257

This issue was caused by PR #24257. I reverted that PR and re-fixed issue #24183. After the new fix, the loop can now terminate.
PR #24257 actually fixed the issue that external nodes could not access variables inside the loop. In this PR, I have also re-fixed it.

Screenshots

Before
Screenshot 2025-08-30 at 11 11 13 PM

After
Screenshot 2025-08-30 at 11 14 13 PM

Screenshot 2025-08-30 at 11 30 20 PM

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/24844 **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 Fixes #24717 Fixes #24257 This issue was caused by PR #24257. I reverted that PR and re-fixed issue #24183. After the new fix, the loop can now terminate. PR #24257 actually fixed the issue that external nodes could not access variables inside the loop. In this PR, I have also re-fixed it. ## Screenshots Before <img width="1530" height="911" alt="Screenshot 2025-08-30 at 11 11 13 PM" src="https://github.com/user-attachments/assets/fa9722ab-6560-4c33-a3fc-f38f814a9067" /> After <img width="1539" height="913" alt="Screenshot 2025-08-30 at 11 14 13 PM" src="https://github.com/user-attachments/assets/02698654-a245-4ce1-a4f4-5dc207cd2866" /> <img width="1532" height="910" alt="Screenshot 2025-08-30 at 11 30 20 PM" src="https://github.com/user-attachments/assets/ebf79794-d8c7-4a1b-86e0-b54a5815155c" /> ## 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:48:17 -05:00
yindo closed this issue 2026-02-21 20:48:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30817