Open MariusVuscanNx opened 3 weeks ago
Based on the context provided, it seems that you are encountering an issue with the Bulk Dispatch Workflows activity in Elsa 3.1.1 where all dispatched workflows are receiving the same input, specifically the last item's values, when mass transit is disabled. This behavior is not expected as each dispatched workflow should receive its corresponding item values.
This could be a bug in the Bulk Dispatch Workflows activity implementation when used with the background provider that relies on MediatR. Since the DispatchedWorkflowHandler is receiving the same value every time, it suggests that there might be an issue with how the items are being iterated and dispatched within the handler.
To address this issue, you should verify the following:
If you have access to the source code, you might also want to debug the DispatchedWorkflowHandler to see why it's not receiving different values as expected.
Unfortunately, without access to the actual source code or the ability to debug the application, I cannot provide a more specific solution. However, reporting this issue on the Elsa GitHub repository as a bug with all the details you've provided here would be a good next step.
This comment was generated by Glime.
Description
If we try to use the Bulk Dispatch Workflows activity with more than one item while having the mass-transit disabled, the same input will be sent to every dispatched workflow. This is reproducible every time and it always take the last item values.
Steps to Reproduce
Attachments: workflow-definitions (7).zip
Reproduction Rate: Indicate how often the bug occurs when following these steps (e.g., "every time", "intermittently: about 50% of the time"). Every time.
Video/Screenshots: Sometimes, complex behaviors are better shown than described. If you think a video or screenshots would help clarify the issue, please include them. No video/screenshot.
Additional Configuration: Mass transit has to be disabled.
Expected Behavior
Each item values should be sent to one workflow only. First item to first workflow, second item to second workflow,...
Actual Behavior
The last item values are sent to every workflow.
Screenshots
Environment
Log Output
No log.
Troubleshooting Attempts
The background provider is used, which relies on MediatR. The sending part seems ok, but in the DispatchedWorkflowHandler we received the same value every time, while we should have received different values (based on the Items array).
Additional Context
No additional info.
Related Issues
No related issue.