Skip to content

+= feature in variable assigner prevents workflow from publishing #11327

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

Closed
5 tasks done
sugoh opened this issue Dec 4, 2024 · 1 comment · Fixed by #11334
Closed
5 tasks done

+= feature in variable assigner prevents workflow from publishing #11327

sugoh opened this issue Dec 4, 2024 · 1 comment · Fixed by #11334
Assignees
Labels
🐞 bug Something isn't working

Comments

@sugoh
Copy link

sugoh commented Dec 4, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • 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).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

v0.11.2

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Open a Dify workflow in Studio GUI
  2. Add a conversation variable with type Number and set the default value to 0
  3. Create a Variable Assigner block
  4. In (3), set the operation to +=
  5. Preview the workflow: the conversation variable will increment as expected
  6. Publish the workflow: you will now get an error saying [Variable Assigner] Variable is required
Screenshot 2024-12-04 at 2 25 09 PM Screenshot 2024-12-04 at 2 25 18 PM

✔️ Expected Behavior

Publish the workflow successfully

❌ Actual Behavior

Error saying [Variable Assigner] Variable is required

@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 4, 2024
Copy link

dosubot bot commented Dec 4, 2024

The issue you're encountering with the '+= feature' in the 'Variable Assigner' block during the publishing process seems to be related to the validation checks that are performed. The error message "[Variable Assigner] Variable is required" is triggered under specific conditions, such as when the variable_selector is not provided or its length is zero, or when the operation is not WriteMode.clear and the value is not provided or is not a number [1].

In your case, it seems that the workflow is not recognizing the variable correctly during the publishing process, even though it works as expected during the preview. This could be due to a validation check that fails when the workflow is being published.

To resolve this, ensure that all required fields in the 'Variable Assigner' block are correctly set and that the variable is properly defined and accessible. If the issue persists, it might be a bug in the current version of Dify (v0.11.2), and you may need to check for any updates or patches that address this issue.

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants