-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
setVariable or getVariable function not working #4789
Comments
The issue stems from the fact that the Without defining the variable first, it will fail. For now, I attached an updated workflow JSON file that works for your scenario. I will think about a way to allow for the dynamic creation of workflow variables. |
The update introduced checks if a variable exists before attempting to set its value in the ExpressionExecutionContextExtensions. If the variable doesn't exist, it now creates one automatically. Fixes #4789
* Disable MassTransitRabbitMq in Elsa.Server.Web. * Create variable if not exists in Workflow.Core The update introduced checks if a variable exists before attempting to set its value in the ExpressionExecutionContextExtensions. If the variable doesn't exist, it now creates one automatically. Fixes #4789 * Remove unnecessary comment The comment indicating to create a variable if it doesn't exist was deemed superfluous and removed from the ExpressionExecutionContextExtensions.cs file. This improves code cleanliness as the functionality is self-explanatory through the existing code structure.
Done via #4800 |
…lows#4800) * Disable MassTransitRabbitMq in Elsa.Server.Web. * Create variable if not exists in Workflow.Core The update introduced checks if a variable exists before attempting to set its value in the ExpressionExecutionContextExtensions. If the variable doesn't exist, it now creates one automatically. Fixes elsa-workflows#4789 * Remove unnecessary comment The comment indicating to create a variable if it doesn't exist was deemed superfluous and removed from the ExpressionExecutionContextExtensions.cs file. This improves code cleanliness as the functionality is self-explanatory through the existing code structure.
Summary:
I'm encountering a problem where the setVariable or getVariable functions are not working as expected within the Run JavaScript action in Elsa 3.0.2 This issue prevents me from effectively setting and retrieving variables within my workflows.
Steps to Reproduce:
Please find workflow json
get_variable.json
The text was updated successfully, but these errors were encountered: