elsa-core
elsa-core copied to clipboard
[BUG] There is no `CurrentValue` variable in the For Loop Activity
Description
There is no CurrentValue variable in the For Loop Activity in the designer.
Steps to Reproduce
- Create a for loop in the designer
- Add a
Run C#block inside of it Console.WriteLine(Variables.Get("CurrentValue"));- Observe the empty writeline otuput
Expected Behavior
I expect that there is a CurrentValue variable as stated by the docs.
Actual Behavior
There is no such varaiable
Screenshots
Environment
Latest docker image ran just to see what Elsa was about 💀
Log Output
N/A
Troubleshooting Attempts
Spent hours browisng the docs, issues, and discussions.... Unknown what else to do, I can't find any way to print out the variables or input available in a scope....
Additional Contex
N/A
Related Issues
Nothing particularly recent
Based on the information provided, it seems like you are encountering an issue where the CurrentValue variable, which should be available within the scope of a ForEach loop in Elsa Workflow, is not present or accessible. This is contrary to what you expect based on the documentation.
To troubleshoot this issue, you can try the following steps:
-
Ensure that you are using the correct syntax to access the
CurrentValuevariable within the ForEach loop. The variable should be automatically available within the scope of the loop. -
Check if there have been any updates or changes to the Elsa Workflow documentation that might have affected the availability or naming of the
CurrentValuevariable. -
Look for any reported issues on the Elsa GitHub repository that might be related to this problem. It's possible that this is a known issue that has already been addressed or is currently being investigated.
-
If you are unable to resolve the issue through documentation or reported issues, consider reaching out to the Elsa community or support channels for assistance. You can create a new issue on the GitHub repository with detailed information about your problem, including the steps to reproduce, expected behavior, actual behavior, and any troubleshooting attempts you have made.
-
As a last resort, if you need to print out the variables or input available in a scope and the standard methods are not working, you might need to implement custom logging within your activities to capture and display this information.
Unfortunately, without access to the latest documentation or the ability to test the workflow directly, I cannot provide a definitive solution. However, following the steps above should help you in identifying and resolving the issue.
If you have any further details or specific questions, please provide them so I can assist you better.
This comment was generated by Glime.
The correct syntaxes are:
Variables.CurrentValue- `Variables.Get
("CurrentValue") // assuming "string" as the list element type.
This works with the latest docker images:
- elsaworkflows/elsa-server-and-studio-v3:latest
- elsaworkflows/elsa-server-and-studio-v3-3-0-preview