diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 61d98c55a..724519f59 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 in a success response if the activity has completed, and\nid_reuse_policy or id_conflict_policy would have caused a failure response otherwise.\nThis is applicable only when the id_reuse_policy is ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE,\nor the activity succeeded and id_reuse_policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY,\nor id_conflict_policy is ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING." } } }, @@ -18955,6 +18959,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 f7053f93a..08d0b5f89 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -16377,6 +16377,14 @@ 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 in a success response if the activity has completed, and + id_reuse_policy or id_conflict_policy would have caused a failure response otherwise. + This is applicable only when the id_reuse_policy is ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE, + or the activity succeeded and id_reuse_policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY, + or id_conflict_policy is ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING. StartActivityExecutionResponse: type: object properties: @@ -16390,6 +16398,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 a4098d9b1..b91213dce 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -3169,6 +3169,13 @@ 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 in a success response if the activity has completed, and + // id_reuse_policy or id_conflict_policy would have caused a failure response otherwise. + // This is applicable only when the id_reuse_policy is ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE, + // or the activity succeeded and id_reuse_policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY, + // or id_conflict_policy is ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING. + bool include_outcome = 23; } message StartActivityExecutionResponse { @@ -3178,6 +3185,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 {