mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-07-22 12:25:45 -04:00
[DOCS]: Example 1 has a logical error: the template transformation output variable does not exist. #262
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @linux-y on GitHub (Nov 5, 2025).
Type of Documentation Change
Error/Typo fix
Documentation Page URL or Path
https://docs.dify.ai/zh-hans/guides/workflow/node/loop#%E7%A4%BA%E4%BE%8B%E4%B8%80%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E5%BE%AA%E7%8E%AF%E8%8A%82%E7%82%B9%EF%BC%9F
Current Content
No response
Suggested Changes
Reason for Change
No response
Code of Conduct
@dosubot[bot] commented on GitHub (Nov 5, 2025):
Hi @linux-y! I'm Dosu and I’m helping the dify-docs team.
You're correct—there is a logical error in Example 1. The loop termination condition relies on the 'done' variable from the template transformation node, but 'done' is only set when the random number is less than 50. For iterations where the number is 50 or above, 'done' does not exist, which can cause issues with loop termination logic. To fix this, the documentation should ensure the termination variable is always defined in every branch of the workflow, or use a variable that is guaranteed to be set each cycle. You can see the problematic logic in the source documentation.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
