-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
In the current implementation, the Assignee in the workflow below cannot be directly converted into a C# class. While this feature may already exist, there is no clear mechanism for specifying the input data type explicitly.
To enhance flexibility and ensure correct deserialization, I propose adding support for specifying the input data type using a property such as:
"DataType": "Workflow.Domain.Data, Workflow.Domain"
This enhancement would allow the deserializer to recognize the intended type and deserialize the object accordingly.
Proposed Solution:
• Introduce a mechanism for specifying the input data type within the workflow definition.
• Modify the deserializer to interpret the DataType field and convert the data into the corresponding C# class.
Potential Benefits:
• Improved type safety in workflow processing.
• Enhanced extensibility for handling complex workflow objects.
• More robust and maintainable serialization/deserialization.
Please let me know if this feature is already available or if it can be considered for implementation. Thank you!
C# class
public class AssigneeInfo { public int Id { get; set; } public string? Name { get; set; } public int MemberType { get; set; } }
Flow Definition:
{ "Id" : "ce54eaf9-eab1-4ce0-a9c8-3a426bb7569a", "Version" : 1, "DataType" : "Workflow.Domain.Data, Workflow.Domain", "Steps" : [ { "Id" : "6fe991a3-1066-4707-97eb-4d54d398f1e3", "StepType" : "Workflow.Domain.Steps.AssignTaskWait, Workflow.Domain", "Inputs" : { "Assignee" : { "id" : 1, "name" : "User Admin", "memberType" : 1 }, "Reason" : "3" } } ] }