dhiaayachi / temporal

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

User metadata not propagated from schedule action to workflow's execution config #28

Open dhiaayachi opened 1 month ago

dhiaayachi commented 1 month ago

Expected Behavior

Like start workflow, I would expect scheduled workflows' user metadata to end up on the execution config on the child workflow.

Actual Behavior

The user metadata does not propagate

dhiaayachi commented 1 month ago

Thank you for reporting this issue. This is a known limitation of Temporal. Currently, user metadata does not propagate to child workflows in scheduled workflows.

We understand the need for this feature and are actively exploring options for implementation. In the meantime, you can work around this limitation by manually setting the metadata on the child workflow when it's started.

Here are some relevant documents for further information:

dhiaayachi commented 1 month ago

Thank you for reporting this issue.

Currently, scheduled workflow user metadata does not propagate to the child workflow execution config. This is an expected behavior.

You can work around this by manually setting the user metadata on the child workflow using the WorkflowOptions in the startWorkflow method.

Here's an example:

WorkflowOptions options = WorkflowOptions.newBuilder()
    .setUserMetadata(Map.of("key", "value"))
    .build();
WorkflowClient client = WorkflowClient.newBuilder().build();
WorkflowStub stub = client.getWorkflowStub();
WorkflowExecution execution = stub.startWorkflow(Workflow.class, options, "myWorkflow");
dhiaayachi commented 1 month ago

Thank you for reporting this issue. I understand your expectation that user metadata should be propagated to child workflows in scheduled workflows, similar to how it works with started workflows.

Currently, user metadata is not automatically propagated to child workflows in scheduled workflows.

To work around this, you can:

We are working on improving this behavior in future releases.

dhiaayachi commented 1 month ago

Thanks for reporting this issue.

Currently, user metadata does not propagate to child workflows for scheduled workflows. This is a known limitation and we are working on addressing it in future releases.

For now, you can consider using the following workaround:

Please refer to the following documentation for more information on workflow state and databases:

We appreciate your feedback and will continue to improve Temporal based on user needs.