elsa-core icon indicating copy to clipboard operation
elsa-core copied to clipboard

Error while deserializing a document of WorflowDefinition - MongoDB

Open ManoDoddy opened this issue 3 years ago • 6 comments

I created an example application following the documentation, when switching from sqlite to mongodb I am getting the following error

An error occurred while deserializing the CreatedAt property of class Elsa.Models.WorkflowDefinition: Value class NodaTime.Instant cannot be deserialized.

When viewing documents, createdat and other timestamp related properties are empty

All packages in version 2.8.2.

ManoDoddy avatar Jul 11 '22 17:07 ManoDoddy

me too :C @sfmskywalker

Juandavi1 avatar Jul 13 '22 04:07 Juandavi1

Any chance any of you can share your sample project with me so I can take a look?

sfmskywalker avatar Jul 14 '22 20:07 sfmskywalker

Any chance any of you can share your sample project with me so I can take a look?

I made a small project available on my github

https://github.com/ManoDoddy/elsa-mongo-test

ManoDoddy avatar Jul 18 '22 14:07 ManoDoddy

This is working for me. Install-Package MongoDb.Bson.NodaTime -Version 3.0.0 Then add this line on startup: NodaTimeSerializers.Register();

But works only for newly created workflows, export/import still broken for some reason.

marufbd avatar Jul 29 '22 04:07 marufbd

This is working for me. Install-Package MongoDb.Bson.NodaTime -Version 3.0.0 Then add this line on startup: NodaTimeSerializers.Register();

But works only for newly created workflows, export/import still broken for some reason.

Thank you @marufbd . It worked like a charm.

ricardopaulob avatar Aug 11 '22 13:08 ricardopaulob

++ thank you @marufbd Bless you, you lifesaver

kyle-inv-disco avatar Sep 26 '22 04:09 kyle-inv-disco