Open dhiaayachi opened 2 months ago
Thanks for reporting this!
This is a known issue. It was reported in https://github.com/temporalio/temporal/pull/5857
You can use GetInfo
to access the user metadata.
Thanks for reporting this. User metadata only ends up on the event, not the actual child workflow. To set user metadata for a child workflow, you can use the StartChildWorkflowOptions
object.
Here is an example of how to do it in the Go SDK:
childWorkflowOptions := workflow.ChildWorkflowOptions{
// ...
UserMetadata: map[string]string{
"key": "value",
"key2": "value2",
},
}
ctx = workflow.WithChildOptions(ctx, childWorkflowOptions)
childWorkflowFuture := workflow.ExecuteChildWorkflow(ctx, YourOtherWorkflowDefinition, ChildParams{})
// ...
For other SDKs, refer to the documentation for setting user metadata on StartChildWorkflowOptions
.
Expected Behavior
Like start workflow, I would expect start child workflow user metadata to end up on the execution config on the child workflow.
Actual Behavior
The user metadata only ends up on the event, not the actual child workflow
See https://github.com/temporalio/temporal/pull/5857 where user metadata propagation was added.