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] 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 {