Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions nexus/temporal-proto-models-nexusrpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,18 @@ services:
$pythonRef: temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse
$rubyRef: Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionResponse
$typescriptRef: '@temporalio/api/workflowservice/v1.SignalWithStartWorkflowExecutionResponse'
WaitForExternalWorkflow:
input:
$dotnetRef: Temporalio.Api.WorkflowService.V1.WaitForExternalWorkflowRequest
$goRef: go.temporal.io/api/workflowservice/v1.WaitForExternalWorkflowRequest
$javaRef: io.temporal.api.workflowservice.v1.WaitForExternalWorkflowRequest
$pythonRef: temporalio.api.workflowservice.v1.WaitForExternalWorkflowRequest
$rubyRef: Temporalio::Api::WorkflowService::V1::WaitForExternalWorkflowRequest
$typescriptRef: '@temporalio/api/workflowservice/v1.WaitForExternalWorkflowRequest'
output:
$dotnetRef: Temporalio.Api.WorkflowService.V1.WaitForExternalWorkflowResponse
$goRef: go.temporal.io/api/workflowservice/v1.WaitForExternalWorkflowResponse
$javaRef: io.temporal.api.workflowservice.v1.WaitForExternalWorkflowResponse
$pythonRef: temporalio.api.workflowservice.v1.WaitForExternalWorkflowResponse
$rubyRef: Temporalio::Api::WorkflowService::V1::WaitForExternalWorkflowResponse
$typescriptRef: '@temporalio/api/workflowservice/v1.WaitForExternalWorkflowResponse'
122 changes: 122 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4179,6 +4179,51 @@
]
}
},
"/api/v1/namespaces/{namespace}/workflows/{execution.workflowId}/wait-for-external-workflow": {
"post": {
"summary": "WaitForExternalWorkflow asynchronously waits for an external workflow to complete",
"operationId": "WaitForExternalWorkflow2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1WaitForExternalWorkflowResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "execution.workflowId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/WorkflowServiceWaitForExternalWorkflowBody"
}
}
],
"tags": [
"WorkflowService"
]
}
},
"/api/v1/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/cancel": {
"post": {
"summary": "RequestCancelWorkflowExecution is called by workers when they want to request cancellation of\na workflow execution.",
Expand Down Expand Up @@ -9654,6 +9699,51 @@
]
}
},
"/namespaces/{namespace}/workflows/{execution.workflowId}/wait-for-external-workflow": {
"post": {
"summary": "WaitForExternalWorkflow asynchronously waits for an external workflow to complete",
"operationId": "WaitForExternalWorkflow",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1WaitForExternalWorkflowResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "execution.workflowId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/WorkflowServiceWaitForExternalWorkflowBody"
}
}
],
"tags": [
"WorkflowService"
]
}
},
"/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/cancel": {
"post": {
"summary": "RequestCancelWorkflowExecution is called by workers when they want to request cancellation of\na workflow execution.",
Expand Down Expand Up @@ -12920,6 +13010,24 @@
},
"description": "Used to validate the compute config without attaching it to a Worker Deployment Version."
},
"WorkflowServiceWaitForExternalWorkflowBody": {
"type": "object",
"properties": {
"execution": {
"type": "object",
"properties": {
"runId": {
"type": "string"
}
},
"description": "The workflow execution to wait for.",
"title": "The workflow execution to wait for."
},
"identity": {
"type": "string"
}
}
},
"apiActivityV1CallbackInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -19813,6 +19921,20 @@
},
"description": "Used to override the versioning behavior (and pinned deployment version, if applicable) of a\nspecific workflow execution. If set, this override takes precedence over worker-sent values.\nSee `WorkflowExecutionInfo.VersioningInfo` for more information.\n\nTo remove the override, call `UpdateWorkflowExecutionOptions` with a null\n`VersioningOverride`, and use the `update_mask` to indicate that it should be mutated.\n\nPinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new\nworkflows, and cron workflows."
},
"v1WaitForExternalWorkflowResponse": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/v1WorkflowExecutionStatus"
},
"result": {
"$ref": "#/definitions/v1Payload"
},
"failure": {
"$ref": "#/definitions/v1Failure"
}
}
},
"v1WaitPolicy": {
"type": "object",
"properties": {
Expand Down
115 changes: 115 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3754,6 +3754,48 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/wait-for-external-workflow:
post:
tags:
- WorkflowService
description: |-
WaitForExternalWorkflow asynchronously waits for an external workflow to complete

(-- api-linter: core::0127::http-annotation=disabled
aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --)
(-- api-linter: core::0136::prepositions=disabled
aip.dev/not-precedent: WaitForExternalWorkflow is the established name for this operation. --)
operationId: WaitForExternalWorkflow
parameters:
- name: namespace
in: path
required: true
schema:
type: string
- name: execution.workflow_id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WaitForExternalWorkflowRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/WaitForExternalWorkflowResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/namespaces/{namespace}/workflows/{workflowId}:
post:
tags:
Expand Down Expand Up @@ -8699,6 +8741,48 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
/namespaces/{namespace}/workflows/{execution.workflow_id}/wait-for-external-workflow:
post:
tags:
- WorkflowService
description: |-
WaitForExternalWorkflow asynchronously waits for an external workflow to complete

(-- api-linter: core::0127::http-annotation=disabled
aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --)
(-- api-linter: core::0136::prepositions=disabled
aip.dev/not-precedent: WaitForExternalWorkflow is the established name for this operation. --)
operationId: WaitForExternalWorkflow
parameters:
- name: namespace
in: path
required: true
schema:
type: string
- name: execution.workflow_id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WaitForExternalWorkflowRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/WaitForExternalWorkflowResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/namespaces/{namespace}/workflows/{workflowId}:
post:
tags:
Expand Down Expand Up @@ -18105,6 +18189,37 @@ components:

If omitted and the target workflow is not pinned, the override request
will be rejected with a PreconditionFailed error.
WaitForExternalWorkflowRequest:
type: object
properties:
namespace:
type: string
execution:
allOf:
- $ref: '#/components/schemas/WorkflowExecution'
description: The workflow execution to wait for.
identity:
type: string
WaitForExternalWorkflowResponse:
type: object
properties:
status:
enum:
- WORKFLOW_EXECUTION_STATUS_UNSPECIFIED
- WORKFLOW_EXECUTION_STATUS_RUNNING
- WORKFLOW_EXECUTION_STATUS_COMPLETED
- WORKFLOW_EXECUTION_STATUS_FAILED
- WORKFLOW_EXECUTION_STATUS_CANCELED
- WORKFLOW_EXECUTION_STATUS_TERMINATED
- WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW
- WORKFLOW_EXECUTION_STATUS_TIMED_OUT
- WORKFLOW_EXECUTION_STATUS_PAUSED
type: string
format: enum
result:
$ref: '#/components/schemas/Payload'
failure:
$ref: '#/components/schemas/Failure'
WaitPolicy:
type: object
properties:
Expand Down
16 changes: 16 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3544,3 +3544,19 @@ message DeleteNexusOperationExecutionRequest {

message DeleteNexusOperationExecutionResponse {
}

message WaitForExternalWorkflowRequest {
string namespace = 1;
// The workflow execution to wait for.
temporal.api.common.v1.WorkflowExecution execution = 2;
string identity = 3;
}

message WaitForExternalWorkflowResponse {
temporal.api.enums.v1.WorkflowExecutionStatus status = 1;

oneof completion_status {
temporal.api.common.v1.Payload result = 2;
temporal.api.failure.v1.Failure failure = 3;
}
}
23 changes: 23 additions & 0 deletions temporal/api/workflowservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2026,4 +2026,27 @@ service WorkflowService {
// (-- api-linter: core::0127::http-annotation=disabled
// aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --)
rpc DeleteNexusOperationExecution (DeleteNexusOperationExecutionRequest) returns (DeleteNexusOperationExecutionResponse) {}

// WaitForExternalWorkflow asynchronously waits for an external workflow to complete
//
// (-- api-linter: core::0127::http-annotation=disabled
// aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --)
// (-- api-linter: core::0136::prepositions=disabled
// aip.dev/not-precedent: WaitForExternalWorkflow is the established name for this operation. --)
rpc WaitForExternalWorkflow (WaitForExternalWorkflowRequest) returns (WaitForExternalWorkflowResponse) {
option (nexusannotations.v1.operation).tags = "exposed";

option (google.api.http) = {
post: "/namespaces/{namespace}/workflows/{execution.workflow_id}/wait-for-external-workflow"
body: "*"
additional_bindings {
post: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/wait-for-external-workflow"
body: "*"
}
};
option (temporal.api.protometa.v1.request_header) = {
header: "temporal-resource-id"
value: "workflow:{execution.workflow_id}"
};
}
}
Loading