Skip to content
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

Elsa 3 error executing csharp expression - The memory block 'Elsa.Expressions.Models.MemoryBlockReference' does not exist #5264

Open
rmanjusha opened this issue Apr 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rmanjusha
Copy link

rmanjusha commented Apr 23, 2024

Description

Getting error - 'The memory block 'Elsa.Expressions.Models.MemoryBlockReference' does not exist' when a accessing workflow input inside "Elsa.FlowDecision" using csharp expression "Input.Get("IsError")"

Steps to Reproduce

1. Workflow uses custom activities and FlowDecision. Workflow expects input of type boolean
2. The flow is designed using designer and WorkFlow JSON is exported  and run from .Net 8 application using code below

image

Attached is the workflow json generated

elsa3.json

Please advise.

@rmanjusha rmanjusha added the bug Something isn't working label Apr 23, 2024
Copy link

glime-ai bot commented Apr 23, 2024

To address the issue you're encountering with the 'The memory block 'Elsa.Expressions.Models.MemoryBlockReference' does not exist' error, it's important to ensure that the workflow is correctly configured to pass and receive the expected inputs and outputs, especially when dealing with custom activities and decisions.

Here are a few steps you can take to troubleshoot and potentially resolve the issue:

  1. Check the Workflow Definition: Ensure that the workflow definition (JSON) is correctly structured and that the input for the Elsa.FlowDecision activity is correctly mapped to the expected boolean value.

  2. Review Custom Activities: If you are using custom activities, make sure that they are correctly returning the expected outputs and that these outputs are accessible to the Elsa.FlowDecision activity.

  3. Examine the Workflow Context: Verify that the workflow context at runtime contains the necessary data and that it is being passed correctly to the Elsa.FlowDecision activity.

  4. Update Elsa Packages: If you are not using the latest version of Elsa, consider updating to the latest stable release, as it may contain bug fixes and improvements that could resolve your issue.

  5. Consult Elsa Documentation: Review the official Elsa documentation for guidance on working with inputs and outputs, custom activities, and decision activities.

  6. Seek Community Help: If the issue persists, consider reaching out to the Elsa community on GitHub or other forums for assistance. Provide detailed information about your issue, including the workflow definition and any relevant code snippets.

  7. Debugging: Use debugging tools to step through the workflow execution and inspect the state of the workflow at the point where the error occurs. This can help identify any discrepancies in the data being passed to the Elsa.FlowDecision activity.

If you have already tried these steps without success, please provide additional details about the custom activities you are using and how you are passing inputs into the workflow. This information will be crucial to further diagnose and resolve the issue.

This comment was generated by Glime.

@rmanjusha rmanjusha changed the title Elsa 3 error - The memory block 'Elsa.Expressions.Models.MemoryBlockReference' does not exist Elsa 3 error executing csharp expression - The memory block 'Elsa.Expressions.Models.MemoryBlockReference' does not exist Apr 23, 2024
@rmanjusha
Copy link
Author

Attached is updated workflow saving activity result to workflow variable and using that in decision . When loading the workflow json the variable count shows zero. But workflow json has variables defined. Could this be the reason for error ? @sfmskywalker Please advise.

decision-with-activity-output.json

image

image

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

No branches or pull requests

1 participant