Attach user metadata from commands to corresponding history events
What changed?
In this PR we are attaching the user metadata if found in the command to the corresponding history events that are being created.
Why?
Users need a way to set arbitrary information on workflows and events. This would be later used in the clients to build custom tooling (ex: UI showing additional information about a timer event etc)
How did you test it?
Added unit tests
Potential risks
N/A. It is backward compatible.
Documentation
N/A
Is hotfix candidate?
No
Will let others more familiar with this repo review. But I want to confirm that some features will be present:
- Is the user metadata on
StartWorkflowExecutionandSignalWithStartWorkflowExecutionRequestcopied to the start event? - Is the user metadata on the child workflow command copied to the workflow start event?
- Is the user metadata on
NewWorkflowExecutionInfocopied to the start event on schedules? - Is the user metadata on
WorkflowExecutionConfigreturned from describe populated with the metadata the workflow was started with?
Will let others more familiar with this repo review. But I want to confirm that some features will be present:
- Is the user metadata on
StartWorkflowExecutionandSignalWithStartWorkflowExecutionRequestcopied to the start event?- Is the user metadata on the child workflow command copied to the workflow start event?
- Is the user metadata on
NewWorkflowExecutionInfocopied to the start event on schedules?- Is the user metadata on
WorkflowExecutionConfigreturned from describe populated with the metadata the workflow was started with?
This is PR is just for commands only (to keep PRs short). I'm working on another PR to include user metadata in all the other areas you mentioned.