-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Paths Between IF/ELSE Branches Invalidate Conditions and Execute All Paths #11542
Comments
@GreenerZ Hello! I'm here to help you with your bug report. I can assist with solving bugs, answering questions, and becoming a contributor. The issue you're experiencing with Dify's workflow engine, where multiple paths between IF/ELSE branches cause all paths to execute, seems to be a bug related to how the engine handles conditional branching. This can lead to the invalidation of conditions and unintended execution of all subsequent paths. A temporary workaround, as you mentioned, is to add an empty component in all paths, such as assigning a value to an empty variable. This can help circumvent the issue by ensuring that each path has a distinct execution step, which might prevent the conditions from being invalidated. This problem might be similar to issues #10638 and #10564, indicating that it could be a known bug in the system. If the problem persists, consider checking for updates or patches that might address this issue in future releases of Dify. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
can you provide your dsl? thanks a lot. |
|
…d Execute All Paths close langgenius#11542 Signed-off-by: yihong0618 <[email protected]>
@GreenerZ fixed can you check ? |
i'm trying to pull 11544 to local and cp patched files to docker api and worker container and restart. |
thanks will check this dsl |
for situation 1 please the workaround for now, there's no better for now, maybe do some dig later |
Okay, I'll temporarily adopt the temporary solution to handle this. |
|
…ons and Execute All Paths close langgenius#11542 Signed-off-by: yihong0618 <[email protected]>
Self Checks
Dify version
0.13.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I have searched for existing issues, and this problem is similar to #10638 and #10564, but the trigger method is more concise.
I want to control the progress branches of a multi-turn dialogue by using IF/ELSE to judge the content of the variable.
But if there are multiple paths connecting two IF/ELSE branches (with one being a direct connection), it will cause the condition of the second branch to become invalid and execute all subsequent paths.
Steps
Situation 1
Here is an example with two conditional branches, one of which has a direct connection path.
Temporary solution
Adding an empty component in all paths, such as assigning a value to an empty variable, can temporarily circumvent this issue.
Situation 2
If multiple paths leading out of the IF/ELSE connect to the same problem classifier, an error indicating no results will also occur.
Once this issue occurs, the problem classifier can no longer function properly and can only be deleted and rebuilt.
✔️ Expected Behavior
Execute according to the correct multi-level branching logic structure.
❌ Actual Behavior
The failure of the IF/ELSE condition resulted in all child branches being triggered.
The text was updated successfully, but these errors were encountered: