-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[BUG] Serialization error when 'MessageReceived' activity is used in workflow #5356
Comments
It appears that you are encountering a serialization issue with the To resolve this issue, you can switch to using Here are the steps you can follow:
Here's an example of how you might configure the services: services
.AddElsa(elsa => elsa
.UseEntityFrameworkPersistence(ef => ef.UseSqlite(...))
.AddConsoleActivities()
.AddHttpActivities()
.AddMassTransitActivities()
.UseNewtonsoftJson() // Use Newtonsoft.Json for serialization
); Make sure to replace the By making this change, you should be able to avoid the serialization issue you're encountering with Please note that the links to the screenshots you provided are not accessible, but the steps above should guide you in resolving the serialization issue based on the error message and the related GitHub issues you've referenced. This comment was generated by Glime. |
The suggested solution by AI will not work because Elsa 3 does not have the NuGet package 'Elsa.NewtonsoftJson,' as far as I understand. Am I missing anything in the 'MessageReceived' activity configuration in the WorkflowDefinition? Please confirm. |
Looks like a bug. NewtonsoftJson has indeed nothing to do with it. |
@sfmskywalker |
'MessageReceived' activity is working well in the latest code on the main branch. I downloaded the latest Elsa code from the main branch and checked it with my changes. The 'Message Received' activity is receiving messages from 'Azure Service Bus' without any problem with serialization. I am not sure which change solved the issue. Please let me know if someone knows the commit that solves the issue. I believe these changes will be included in version 3.2, which is scheduled for release on June 1, 2024. Please confirm the same |
@cvijayak your guess is as good as mine, my friend. And yes, the code in the main branch will be released into 3.2. |
Closing this issue, given that this doesn't seem to be reproducible with the source code version, |
Description
Following is the class created for the message 'OrderCompleted'.
I am able to publish the message in Azure Service Bus using MassTransit. However, when the message is received in a workflow that uses the 'MessageReceived' activity, I encounter the following serialization exception.
Expected Behavior
The 'MessageReceived' activity should be able to receive the message 'OrderCompleted' without any issues.
Actual Behavior
The 'MessageReceived' activity throws a serialization error when the message 'OrderCompleted' arrives from Azure Service Bus.
Screenshots
Screenshot shows the error from Azure Service Bus
Additional Context
Below is the 'MessageReceived' activity configuration from WorkflowDefinition
Below screenshot shows how the dashboard shows the masstransit activities
I am using elsa 3.1.3
The text was updated successfully, but these errors were encountered: