Is your feature request related to a problem? Please describe.
Context aware data converters should have some way to get ID of outbound activities and child workflows when the data converter is being used to serialize activity input or child workflow input. This is useful if the data converter changes behaviour based on the workflow ID, for example using the ID as associated data for encryption.
In the Java SDK this is trivial because the Java SDK will pass the child workflow ID to the data converter when serializing the child workflow input
Describe the solution you'd like
I can think of acceptable solutions:
Users could create an interceptor to manually set the activity ID/ child workflow ID, maybe the SDK can provide some random generator to help create deterministic UUIDs. Other SDK already have helpers for this so maybe it is worth doing regardless.
Ideally the ID would be accessible in the WithContext or WithWorkflowContext call on the data converter. When we generate the ID in question we could set it on the context and pass that context with the ID to the context aware data converter. This would require some minor refactoring to when the SDK generates an activity ID/ child workflow ID
Is your feature request related to a problem? Please describe. Context aware data converters should have some way to get ID of outbound activities and child workflows when the data converter is being used to serialize activity input or child workflow input. This is useful if the data converter changes behaviour based on the workflow ID, for example using the ID as associated data for encryption.
In the Java SDK this is trivial because the Java SDK will pass the child workflow ID to the data converter when serializing the child workflow input
Describe the solution you'd like I can think of acceptable solutions:
Users could create an interceptor to manually set the activity ID/ child workflow ID, maybe the SDK can provide some random generator to help create deterministic UUIDs. Other SDK already have helpers for this so maybe it is worth doing regardless.
Ideally the ID would be accessible in the
WithContext
orWithWorkflowContext
call on the data converter. When we generate the ID in question we could set it on the context and pass that context with the ID to the context aware data converter. This would require some minor refactoring to when the SDK generates an activity ID/ child workflow ID