Comments (9)
It appears that you are encountering a serialization issue with the MessageReceived
activity in Elsa when using MassTransit with Azure Service Bus. This issue is related to the serialization and deserialization of System.Type
instances, which is not supported by System.Text.Json
, the default serializer used by Elsa.
To resolve this issue, you can switch to using Newtonsoft.Json
for serialization, which does support serializing System.Type
instances. You can configure Elsa to use Newtonsoft.Json
by adding the appropriate package and configuring the serialization options.
Here are the steps you can follow:
- Install the
Elsa.NewtonsoftJson
NuGet package. - Configure Elsa to use
Newtonsoft.Json
by modifying the service registration code in yourStartup.cs
orProgram.cs
file, depending on your .NET version.
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 ...
with your actual Entity Framework configuration or other Elsa configuration as needed.
By making this change, you should be able to avoid the serialization issue you're encountering with System.Type
instances.
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.
from elsa-core.
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.
from elsa-core.
Looks like a bug. NewtonsoftJson has indeed nothing to do with it.
from elsa-core.
@sfmskywalker
I think the changes in the commit below will resolve this bug. Please share your comments on this.
367f574
from elsa-core.
'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
from elsa-core.
@cvijayak your guess is as good as mine, my friend. And yes, the code in the main branch will be released into 3.2.
from elsa-core.
Closing this issue, given that this doesn't seem to be reproducible with the source code version,
from elsa-core.
I'm having this issue. Any help with the solution? I'm new to Elsa Workflow and I'm using 3.1
from elsa-core.
This should be fixed as of 3.2 (3.2-rc3 is available via nuget in case you want to try).
from elsa-core.
Related Issues (20)
- [BUG] Elsa Core only support UTC time?
- [FEAT] OpenIddict Module
- [BUG]Looking for help using SqlServer HOT 1
- [BUG] Null Variables and Non-evaluating C#/JavaScript Expressions in Elsa Workflow Loaded from JSON HOT 2
- [BUG] Workflow instance state persistence timeout after bookmark resumption leaves instance state showing suspended, yet further activities in workflow have executed
- [BUG] Failed to start workflow when using MSSQL server as persistence provider HOT 2
- [FEAT] Database Table Creation and Modification Module from UI
- all tasks are completed, but sub state is suspended
- Custom variable type namespace not found HOT 2
- Upgrade Elsa.Persistence.MongoDb in version 2.14.1 references unsigned versino of mongodb. HOT 2
- [CHORE] Update MongoDB Driver to Use Strong-Named Assemblies in Elsa.MongoDB and Elsa.Persistence.MongoDB HOT 2
- [BUG] Invalid column name 'SerializedProperties'
- [BUG] No instance created on timeout
- [BUG] Workflows Instance - Export functionality produces a corrupt ZIP file
- Define Activity Predecessors
- [BUG] Delay node doesn't work when TimeSpan Input has the value of 72:00:00 HOT 1
- [ENH] ActivityProviders are being executed mutiple times
- [BUG] Workflow definition not getting loaded in elsa dashboard
- [BUG] Problem with Elsa.ServerAndStudio.Web project
- [ENH] Enhance logging by adding logger state to activity and workflow pipelines HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elsa-core.