cadence-workflow / cadence-go-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
352 stars 132 forks source link

Allow updating memo in workflow #1033

Open longquanzheng opened 4 years ago

longquanzheng commented 4 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I want to update memo during workflow execution like upsertSearchAttribute

Proposed Solution A clear and concise description of what you want to happen. Allow updating memo in workflow

Additional context Add any other context or screenshots about the feature request here. Need a support in server: https://github.com/uber/cadence/issues/3729

ibarrajo commented 2 weeks ago

For anyone looking for a workaround:

Once a workflow is started, the memo data cannot be updated at this time. If you need the capability to update information during the workflow execution, consider using search attributes instead, which can be updated and are indexed by Elasticsearch.1

To include memo data, you should specify it as part of the StartWorkflowOptions when initiating a workflow. This is applicable for both the Go and Java clients. If modifying existing information within a running workflow is crucial, leveraging search attributes would be the appropriate approach, with extensions via the UpsertSearchAttributes function suited for this purpose. However, this requires Elasticsearch support.