dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

User metadata not propagated from child workflow command to child workflow's execution config #69

Open dhiaayachi opened 3 weeks ago

dhiaayachi commented 3 weeks ago

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.

dhiaayachi commented 1 week ago

Thanks for reporting this issue. User metadata is currently only propagated to the child workflow's first event, not its execution config.

We are looking into ways to improve user metadata propagation in the future. You can keep an eye on the Temporal GitHub repository for updates.

In the meantime, here's a workaround:

  1. Read the user metadata from the child workflow's first event. You can access the first event using the GetWorkflowExecutionHistory API.
  2. Store the user metadata in the child workflow's execution context. This allows you to access it throughout the child workflow's execution.

Let us know if you have any other questions.

dhiaayachi commented 1 week ago

Thanks for reporting this issue. This is a known behavior that the user metadata only ends up on the event, not on the child workflow itself.

You can find more information on User Metadata in the documentation here: https://docs.temporal.io/workflows#user-metadata