diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index b961ba800..c04f3f035 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -5684,28 +5684,6 @@ }, "description": "An operation completed successfully." }, - "UnpauseActivityByIdRequestResetOperation": { - "type": "object", - "properties": { - "noWait": { - "type": "boolean", - "description": "Indicates that the activity should be scheduled immediately.\nNote that this may run simultaneously with any existing executions of the activity." - }, - "resetHeartbeat": { - "type": "boolean", - "title": "If set, the Heartbeat Details will be cleared out to make the Activity start over from the beginning" - } - } - }, - "UnpauseActivityByIdRequestResumeOperation": { - "type": "object", - "properties": { - "noWait": { - "type": "boolean", - "description": "Indicates that if the activity is waiting to retry, it will be scheduled immediately." - } - } - }, "UpdateWorkerBuildIdCompatibilityRequestAddNewCompatibleVersion": { "type": "object", "properties": { @@ -6453,6 +6431,9 @@ }, "updateWorkflowOptionsOperation": { "$ref": "#/definitions/v1BatchOperationUpdateWorkflowExecutionOptions" + }, + "unpauseActivitiesOperation": { + "$ref": "#/definitions/v1BatchOperationUnpauseActivities" } } }, @@ -6629,10 +6610,10 @@ "description": "Used to de-dupe requests." }, "resume": { - "$ref": "#/definitions/UnpauseActivityByIdRequestResumeOperation" + "$ref": "#/definitions/v1UnpauseActivityByIdRequestResumeOperation" }, "reset": { - "$ref": "#/definitions/UnpauseActivityByIdRequestResetOperation" + "$ref": "#/definitions/v1UnpauseActivityByIdRequestResetOperation" } } }, @@ -7462,6 +7443,56 @@ ], "default": "BATCH_OPERATION_TYPE_UNSPECIFIED" }, + "v1BatchOperationUnpauseActivities": { + "type": "object", + "properties": { + "identity": { + "type": "string", + "description": "The identity of the worker/client." + }, + "resume": { + "$ref": "#/definitions/v1BatchOperationUnpauseActivitiesResumeOperation" + }, + "reset": { + "$ref": "#/definitions/v1BatchOperationUnpauseActivitiesResetOperation" + }, + "activityType": { + "type": "string", + "title": "The type of activity to unpause" + }, + "pauseId": { + "type": "string", + "description": "Batch will apply only to the paused activities paused by a specified id\nIf not set, the batch will apply to all paused activities of a specified type.\nFor manual pause, this can contain a pause reason. For rule it can be rule id or rule name." + }, + "pauseType": { + "type": "string", + "title": "Batch will apply only to the activities paused by a specified pause type.\nOptions are: 'manual', 'rule', 'policy' (atm 'policy' is not supported)" + } + }, + "description": "BatchOperationPauseActivities sends unpause requests to batch workflows." + }, + "v1BatchOperationUnpauseActivitiesResetOperation": { + "type": "object", + "properties": { + "noWait": { + "type": "boolean", + "title": "Indicates that the activity should be scheduled immediately.\nThat this may run simultaneously with any existing executions of the activity.\nNote: currently this flag is not supported in batch request" + }, + "resetHeartbeat": { + "type": "boolean", + "title": "If set, the Heartbeat Details will be cleared out to make the Activity start over from the beginning" + } + } + }, + "v1BatchOperationUnpauseActivitiesResumeOperation": { + "type": "object", + "properties": { + "noWait": { + "type": "boolean", + "description": "Indicates that if the activity is waiting to retry, it will be scheduled immediately." + } + } + }, "v1BatchOperationUpdateWorkflowExecutionOptions": { "type": "object", "properties": { @@ -12433,6 +12464,28 @@ } } }, + "v1UnpauseActivityByIdRequestResetOperation": { + "type": "object", + "properties": { + "noWait": { + "type": "boolean", + "description": "Indicates that the activity should be scheduled immediately.\nNote that this may run simultaneously with any existing executions of the activity." + }, + "resetHeartbeat": { + "type": "boolean", + "title": "If set, the Heartbeat Details will be cleared out to make the Activity start over from the beginning" + } + } + }, + "v1UnpauseActivityByIdRequestResumeOperation": { + "type": "object", + "properties": { + "noWait": { + "type": "boolean", + "description": "Indicates that if the activity is waiting to retry, it will be scheduled immediately." + } + } + }, "v1UnpauseActivityByIdResponse": { "type": "object" }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 015474359..4704b0086 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -5372,6 +5372,49 @@ components: BatchOperationTermination sends terminate requests to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest. Ignore first_execution_run_id because this is used for single workflow operation. + BatchOperationUnpauseActivities: + type: object + properties: + identity: + type: string + description: The identity of the worker/client. + resume: + $ref: '#/components/schemas/BatchOperationUnpauseActivities_ResumeOperation' + reset: + $ref: '#/components/schemas/BatchOperationUnpauseActivities_ResetOperation' + activityType: + type: string + description: The type of activity to unpause + pauseId: + type: string + description: |- + Batch will apply only to the paused activities paused by a specified id + If not set, the batch will apply to all paused activities of a specified type. + For manual pause, this can contain a pause reason. For rule it can be rule id or rule name. + pauseType: + type: string + description: |- + Batch will apply only to the activities paused by a specified pause type. + Options are: 'manual', 'rule', 'policy' (atm 'policy' is not supported) + description: BatchOperationPauseActivities sends unpause requests to batch workflows. + BatchOperationUnpauseActivities_ResetOperation: + type: object + properties: + noWait: + type: boolean + description: |- + Indicates that the activity should be scheduled immediately. + That this may run simultaneously with any existing executions of the activity. + Note: currently this flag is not supported in batch request + resetHeartbeat: + type: boolean + description: If set, the Heartbeat Details will be cleared out to make the Activity start over from the beginning + BatchOperationUnpauseActivities_ResumeOperation: + type: object + properties: + noWait: + type: boolean + description: Indicates that if the activity is waiting to retry, it will be scheduled immediately. BatchOperationUpdateWorkflowExecutionOptions: type: object properties: @@ -9152,6 +9195,8 @@ components: $ref: '#/components/schemas/BatchOperationReset' updateWorkflowOptionsOperation: $ref: '#/components/schemas/BatchOperationUpdateWorkflowExecutionOptions' + unpauseActivitiesOperation: + $ref: '#/components/schemas/BatchOperationUnpauseActivities' StartBatchOperationResponse: type: object properties: {} diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index cd243e838..4a531119c 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -117,3 +117,23 @@ message BatchOperationUpdateWorkflowExecutionOptions { // To unset a field, set it to null and use the update mask to indicate that it should be mutated. google.protobuf.FieldMask update_mask = 3; } + +// BatchOperationPauseActivities sends unpause requests to batch workflows. +message BatchOperationUnpauseActivities { + // The identity of the worker/client. + string identity = 1; + + // The activity type to unpause. + string activity_type = 2; + + // schedule activity immediately if activity is waiting for the retry + // Indicates that if the activity is waiting to retry, it will be scheduled immediately. + bool skip_retry = 3; + + // If set, the number of attempts will be reset. + bool reset_attempts = 4; + + // If set, the Heartbeat Details will be cleared out to make the Activity start over from the beginning. + // If reset_attempts flag is no set this flag has no effect. + bool reset_heartbeat = 5; +} diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index f84e3e2ce..a6e10eca2 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1561,6 +1561,7 @@ message StartBatchOperationRequest { temporal.api.batch.v1.BatchOperationDeletion deletion_operation = 13; temporal.api.batch.v1.BatchOperationReset reset_operation = 14; temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions update_workflow_options_operation = 15; + temporal.api.batch.v1.BatchOperationUnpauseActivities unpause_activities_operation = 16; } }