-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Modify services.AddWorkflow(x => x.UseMongoDB(@"mongodb://localhost:27017", "workflow"));, then directly start the WorkflowCore.Sample04 project.
An error is immediately thrown in the Deserialize method of the DataObjectSerializer file:
MongoDB.Bson.BsonSerializationException: "Type WorkflowCore.Sample04.MyDataClass is not configured as a type that is allowed to be deserialized for this instance of ObjectSerializer."
I tried adding the following code before the program starts:
csharp
var objectSerializer = new ObjectSerializer(type => ObjectSerializer.DefaultAllowedTypes(type) || type.FullName.StartsWith("WorkflowCore"));
BsonSerializer.RegisterSerializer(objectSerializer);
The error disappeared, but based on the database data, the following code:
csharp
.WaitFor("MyEvent", (data, context) => context.Workflow.Id, data => DateTime.Now).Output(data => data.Value1, step => step.EventData)
did not assign values correctly, which caused the workflow to fail to proceed.
Metadata
Metadata
Assignees
Labels
No labels