Add optional activity outcome in start activity response#785
Open
ks-temporal wants to merge 10 commits into
Open
Add optional activity outcome in start activity response#785ks-temporal wants to merge 10 commits into
ks-temporal wants to merge 10 commits into
Conversation
fretz12
reviewed
May 22, 2026
Co-authored-by: Fred Tzeng <41805201+fretz12@users.noreply.github.com>
bergundy
reviewed
May 26, 2026
dandavison
reviewed
Jun 10, 2026
dandavison
approved these changes
Jun 10, 2026
stephanos
reviewed
Jun 10, 2026
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 changed?
Added a new outcome field of type ActivityExecutionOutcome in
StartActivityExecutionResponse and a new boolean flag of
id_reuse_policy_return_existing_outcome_on_reject in
StartActivityExecutionRequest.
Why?
So that the outcome is included if the execution is already started,
and the activity is already completed, to avoid another query for
the outcome. When a caller's
StartActivityExecutionshort-circuitsto an existing run with the same activity ID because of an ID reuse,
the caller often wants the outcome of the existing run, not just the
identifier or an error pointing at it. Retrieving the outcome in the
response avoids the caller to use a second RPC of
DescribeActivityExecutionto retrieve a result that the serveralready has cached.
Breaking changes
No