elsa-workflows / elsa-workflows/elsa-core
[BUG] WorkflowInput does not persist in Bookmark Callback
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
## Description
When assigning values in the `WorkflowInput `within ActivityExecutionContext within `Execute` methods either directly via activity or via starting workflow the `WorkflowInput `dictionary persists between each activity step. When an activity has a callback function via a Bookmark, accessing `WorkflowInput `within this callback is empty. The expected behaviour is to maintain the Workflow Inputs throughout the lifetime of the Workflow. I believe this might be because `WorkflowInput `can be set in the `TriggerOption `class in the `ResumeWorkflow `and when it's not set, it will initalise an empty Dictonary instead.
## Steps to Reproduce
To help us identify the issue more quickly, please follow these guidelines:
**Detailed Steps**:
1. Create two activities
2. In first activity assign something to `WorkflowInput `within context inside of Execute method
3. In the second activity assign additional element within `WorkflowInput `inside the Execute method
4. You should have two elements when querying `WorkflowInput `in the second activity containing the elements you had specified
5. In sceond activity create a bookmark with a callback
6. Use `IWorkflowRunTime `and resume the workflow without specify any additional options
7. Access `WorkflowInput `within the callback method
8. `WorkflowInput `is empty and the elements assign previous are lost
**Reproduction Rate**: Everytime
## Expected Behavior
The `WorkflowInput `within the bookmark callback should persist all values defined previous in the current execution of the workflow
## Actual Behavior
`WorkflowInput `is empty and has no values, as a result losing all WorkflowInput values previously assigned
## Environment
- **Elsa Package Version**: 3.1
Contributor guide
Assessment
This issue has not been assessed yet.