From e6fcb0d8b580899c157bb65ac1c175df6c508299 Mon Sep 17 00:00:00 2001 From: Kundan <281732484+ks-temporal@users.noreply.github.com> Date: Wed, 20 May 2026 07:58:46 -0700 Subject: [PATCH 1/3] Add optional activity outcome in start activity response --- openapi/openapiv2.json | 8 ++++++++ openapi/openapiv3.yaml | 7 +++++++ temporal/api/workflowservice/v1/request_response.proto | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 65437ff15..3adba52db 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12173,6 +12173,10 @@ "startDelay": { "type": "string", "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts." + }, + "includeOutcome": { + "type": "boolean", + "description": "Include the outcome (result/failure) in the response if the activity has completed." } } }, @@ -18929,6 +18933,10 @@ "link": { "$ref": "#/definitions/v1Link", "description": "Link to the started activity." + }, + "outcome": { + "$ref": "#/definitions/v1ActivityExecutionOutcome", + "description": "Only set if the activity is already completed and include_outcome was true in the request." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index bb733a194..931e6a32a 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -16349,6 +16349,9 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + includeOutcome: + type: boolean + description: Include the outcome (result/failure) in the response if the activity has completed. StartActivityExecutionResponse: type: object properties: @@ -16362,6 +16365,10 @@ components: allOf: - $ref: '#/components/schemas/Link' description: Link to the started activity. + outcome: + allOf: + - $ref: '#/components/schemas/ActivityExecutionOutcome' + description: Only set if the activity is already completed and include_outcome was true in the request. StartBatchOperationRequest: type: object properties: diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 6d2d324a7..3e3c9a162 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -3164,6 +3164,9 @@ message StartActivityExecutionRequest { temporal.api.common.v1.OnConflictOptions on_conflict_options = 21; // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. google.protobuf.Duration start_delay = 22; + + // Include the outcome (result/failure) in the response if the activity has completed. + bool include_outcome = 23; } message StartActivityExecutionResponse { @@ -3173,6 +3176,8 @@ message StartActivityExecutionResponse { bool started = 2; // Link to the started activity. temporal.api.common.v1.Link link = 3; + // Only set if the activity is already completed and include_outcome was true in the request. + temporal.api.activity.v1.ActivityExecutionOutcome outcome = 4; } message DescribeActivityExecutionRequest { From df33ca7b53cd20708f9b5e02a404fce62d2c3893 Mon Sep 17 00:00:00 2001 From: ks-temporal <281732484+ks-temporal@users.noreply.github.com> Date: Tue, 26 May 2026 11:52:41 -0700 Subject: [PATCH 2/3] Update comment based on review Co-authored-by: Fred Tzeng <41805201+fretz12@users.noreply.github.com> --- temporal/api/workflowservice/v1/request_response.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 3e3c9a162..1b07a1d27 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -3165,7 +3165,7 @@ message StartActivityExecutionRequest { // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. google.protobuf.Duration start_delay = 22; - // Include the outcome (result/failure) in the response if the activity has completed. + // Include the outcome in the response if the activity has completed. bool include_outcome = 23; } From 374277413014a38d1ec90da246f27cefc720a031 Mon Sep 17 00:00:00 2001 From: Kundan <281732484+ks-temporal@users.noreply.github.com> Date: Tue, 26 May 2026 12:05:03 -0700 Subject: [PATCH 3/3] Update comment based on review --- openapi/openapiv2.json | 2 +- openapi/openapiv3.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 2811d8c9c..9f5ed9064 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12176,7 +12176,7 @@ }, "includeOutcome": { "type": "boolean", - "description": "Include the outcome (result/failure) in the response if the activity has completed." + "description": "Include the outcome in the response if the activity has completed." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 6579924c5..9c5f685dd 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -16367,7 +16367,7 @@ components: description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. includeOutcome: type: boolean - description: Include the outcome (result/failure) in the response if the activity has completed. + description: Include the outcome in the response if the activity has completed. StartActivityExecutionResponse: type: object properties: