Error in Conditional Workflow When Code Executor Handles Different Knowledge Base Parameters #11137
Closed
5 tasks done
Labels
🐞 bug
Something isn't working
Self Checks
Dify version
0.11.0
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
In a conditional workflow setup, the code executor is configured to set the retrieval results of two knowledge bases as two parameters. Since our business logic requires selecting different knowledge bases based on conditions, when the if condition chooses only the A knowledge base (i.e., the code executor uses only the A parameter), the B parameter does not exist. This causes the code executor to throw an error.
I have already tried implementing default values in Node.js to handle the missing parameters, but the issue persists with the same error
✔️ Expected Behavior
When the conditional logic selects only the A knowledge base, the B parameter should not be required. The code executor should execute normally, using only the available parameter.
❌ Actual Behavior
The code executor throws an error when parameter B is not present, causing the entire workflow to fail.
The text was updated successfully, but these errors were encountered: