diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 40ad5b28..d24fdd85 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -8466,6 +8466,9 @@ "type": "object", "$ref": "#/definitions/v1PendingNexusOperationInfo" } + }, + "workflowExtendedInfo": { + "$ref": "#/definitions/v1WorkflowExecutionExtendedInfo" } } }, @@ -12901,6 +12904,36 @@ } } }, + "v1WorkflowExecutionExtendedInfo": { + "type": "object", + "properties": { + "executionExpirationTime": { + "type": "string", + "format": "date-time", + "description": "Workflow execution expiration time is defined as workflow start time plus expiration timeout.\nWorkflow start time may change after workflow reset." + }, + "runExpirationTime": { + "type": "string", + "format": "date-time", + "description": "Workflow run expiration time is defined as current workflow run start time plus workflow run timeout." + }, + "cancelRequested": { + "type": "boolean", + "title": "indicates if the workflow received a cancel request" + }, + "lastResetTime": { + "type": "string", + "format": "date-time", + "description": "Last workflow reset time. Nil if the workflow was never reset." + }, + "originalStartTime": { + "type": "string", + "format": "date-time", + "description": "Original workflow start time." + } + }, + "description": "Holds all the extra information about workflow execution that is not part of Visibility." + }, "v1WorkflowExecutionFailedEventAttributes": { "type": "object", "properties": { @@ -13015,7 +13048,8 @@ "$ref": "#/definitions/v1WorkflowExecutionVersioningInfo", "description": "Absent value means the workflow execution is not versioned. When present, the execution might\nbe versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`.\nExperimental. Versioning info is experimental and might change in the future." } - } + }, + "description": "Hold basic information about a workflow execution.\nThis structure is a part of visibility, and thus contain a limited subset of information." }, "v1WorkflowExecutionOptions": { "type": "object", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 41c80f14..01547435 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -6157,6 +6157,8 @@ components: type: array items: $ref: '#/components/schemas/PendingNexusOperationInfo' + workflowExtendedInfo: + $ref: '#/components/schemas/WorkflowExecutionExtendedInfo' Endpoint: type: object properties: @@ -10390,6 +10392,31 @@ components: description: |- If this is set, the new execution inherits the Build ID of the current execution. Otherwise, the assignment rules will be used to independently assign a Build ID to the new execution. + WorkflowExecutionExtendedInfo: + type: object + properties: + executionExpirationTime: + type: string + description: |- + Workflow execution expiration time is defined as workflow start time plus expiration timeout. + Workflow start time may change after workflow reset. + format: date-time + runExpirationTime: + type: string + description: Workflow run expiration time is defined as current workflow run start time plus workflow run timeout. + format: date-time + cancelRequested: + type: boolean + description: indicates if the workflow received a cancel request + lastResetTime: + type: string + description: Last workflow reset time. Nil if the workflow was never reset. + format: date-time + originalStartTime: + type: string + description: Original workflow start time. + format: date-time + description: Holds all the extra information about workflow execution that is not part of Visibility. WorkflowExecutionFailedEventAttributes: type: object properties: @@ -10526,6 +10553,9 @@ components: Absent value means the workflow execution is not versioned. When present, the execution might be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`. Experimental. Versioning info is experimental and might change in the future. + description: |- + Hold basic information about a workflow execution. + This structure is a part of visibility, and thus contain a limited subset of information. WorkflowExecutionOptions: type: object properties: diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index e272b817..ec5162fa 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -43,6 +43,9 @@ import "temporal/api/failure/v1/message.proto"; import "temporal/api/taskqueue/v1/message.proto"; import "temporal/api/sdk/v1/user_metadata.proto"; + +// Hold basic information about a workflow execution. +// This structure is a part of visibility, and thus contain a limited subset of information. message WorkflowExecutionInfo { temporal.api.common.v1.WorkflowExecution execution = 1; temporal.api.common.v1.WorkflowType type = 2; @@ -109,6 +112,25 @@ message WorkflowExecutionInfo { WorkflowExecutionVersioningInfo versioning_info = 22; } +// Holds all the extra information about workflow execution that is not part of Visibility. +message WorkflowExecutionExtendedInfo { + // Workflow execution expiration time is defined as workflow start time plus expiration timeout. + // Workflow start time may change after workflow reset. + google.protobuf.Timestamp execution_expiration_time = 1; + + // Workflow run expiration time is defined as current workflow run start time plus workflow run timeout. + google.protobuf.Timestamp run_expiration_time = 2; + + // indicates if the workflow received a cancel request + bool cancel_requested = 3; + + // Last workflow reset time. Nil if the workflow was never reset. + google.protobuf.Timestamp last_reset_time = 4; + + // Original workflow start time. + google.protobuf.Timestamp original_start_time = 5; +} + // Holds all the information about versioning for a workflow execution. // Experimental. Versioning info is experimental and might change in the future. message WorkflowExecutionVersioningInfo { diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index e4036133..f84e3e2c 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -982,6 +982,7 @@ message DescribeWorkflowExecutionResponse { temporal.api.workflow.v1.PendingWorkflowTaskInfo pending_workflow_task = 5; repeated temporal.api.workflow.v1.CallbackInfo callbacks = 6; repeated temporal.api.workflow.v1.PendingNexusOperationInfo pending_nexus_operations = 7; + temporal.api.workflow.v1.WorkflowExecutionExtendedInfo workflow_extended_info = 8; } // (-- api-linter: core::0203::optional=disabled