User supplied DataSerializers should only be used for user level objects
I created a Jackson DataSerializer for my workflows since we use Jackson extensively in our existing code base. I ran into an issue when I started using the Workflow.retry API.
On the Workflow.retry path, it seems the user supplied DataSerializer is used to serialize internal classes like MarkerHeader. My Jackson serializer failed on MarkerHeader because its members are private and it has no accessors. I can define a custom serializer for this and other internal classes as required, but this requirement seems unexpected. In addition, I don't really have a good way of tracking down ahead of time all the places where I might need to supply custom serialization code for internal objects. Instead, I have to find them at runtime.
I would expect that a user supplied DataSerializer should only be used for user level objects: activity parameters and return values, etc.
Internal implementation objects could be serialized using a fixed serializer.