Expose memo on WorkflowStartOptions#1323
Open
GregBowyer wants to merge 1 commit into
Open
Conversation
Adds a public `memo: Option<HashMap<String, Payload>>` field to the bon::Builder-generated builder for WorkflowStartOptions, and wires it through both the StartWorkflowExecutionRequest and SignalWithStartWorkflowExecutionRequest construction paths in client::start_workflow. Memos are returned by list_workflows and describe_workflow_execution, so this lets callers stash small caller-supplied metadata on a workflow without round-tripping through a query. The values must already be serialized Payloads -- the builder does not encode for you. Includes three unit tests covering builder default, builder set, and clone round-trip.
Sushisource
reviewed
Jun 12, 2026
| /// caller-supplied metadata on a workflow without round-tripping through a query. | ||
| /// Each value must already be a serialized `Payload`; the builder does not encode | ||
| /// values for you. | ||
| pub memo: Option<HashMap<String, Payload>>, |
Member
There was a problem hiding this comment.
I'm sure you're just following the pattern with search_attributes here, but, this field (and search_attributes) I think both need helpers on the builder that accept T: TemporalSerializable types, to make the actual serialization easy for users.
Then inside this struct we can store Box<dyn TemporalSerializable>s instead of Payloads and convert them later when these options are passed to the client call.
If you'd rather not do all that we can take over the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Adds a public
memo: Option<HashMap<String, Payload>>field to the bon::Builder-generated builder for WorkflowStartOptions, and wires it through both the StartWorkflowExecutionRequest and SignalWithStartWorkflowExecutionRequest construction paths in client::start_workflow.Memos are returned by list_workflows and describe_workflow_execution, so this lets callers stash small caller-supplied metadata on a workflow without round-tripping through a query. The values must already be serialized Payloads -- the builder does not encode for you.
Includes three unit tests covering builder default, builder set, and clone round-trip.
Why?
So end users of the high level rust SDK can use memos ;)
Checklist
How was this tested:
Basic unit tests and inhouse software
Any docs updates needed?
Not sure probably