Custom Class Serialization in Workflow SDK
Workflow SDK adds custom class serialization support, letting developers pass class instances between workflow and step functions via two static methods in the new @workflow/serde package.
Workflow SDK now supports custom class serialization, letting you pass your own class instances between workflow and step functions. Workflow SDK serializes standard JavaScript types like primitives, objects, arrays, , , , and more. Custom class instances were previously not supported because the serialization system didn't know how to reconstruct them. With the new package, you can define how your classes are serialized and deserialized by implementing two static methods using and .DateMapSetWORKFLOW_SERIALIZEWORKFLOW_DESERIALIZE@workflow/serde Here's of how we used custom serialization in to greatly improve DX:an example@vercel/sandbox Once implemented, instances of your class can be passed as arguments and return values between workflow and step functions, with the serialization system handling conversion automatically.
Read more utilizing and Workflow SDK.See the full example application@vercel/sandbox Read the to learn more.serialization documentation