diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index a9c0c68b..57ff1c8f 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -37,6 +37,7 @@ import "google/protobuf/timestamp.proto"; import "temporal/api/common/v1/message.proto"; import "temporal/api/enums/v1/batch_operation.proto"; +import "temporal/api/enums/v1/reset.proto"; message BatchOperationInfo { // Batch job ID @@ -86,4 +87,15 @@ message BatchOperationCancellation { message BatchOperationDeletion { // The identity of the worker/client string identity = 1; +} + +// BatchOperationReset sends reset requests to batch workflows. +// Keep the parameter in sync with temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest. +message BatchOperationReset { + // Reset type. + temporal.api.enums.v1.ResetType reset_type = 1; + // History event reapply options. + temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 2; + // The identity of the worker/client. + string identity = 3; } \ No newline at end of file diff --git a/temporal/api/enums/v1/batch_operation.proto b/temporal/api/enums/v1/batch_operation.proto index ef28c41c..c6e01ecd 100644 --- a/temporal/api/enums/v1/batch_operation.proto +++ b/temporal/api/enums/v1/batch_operation.proto @@ -37,6 +37,7 @@ enum BatchOperationType { BATCH_OPERATION_TYPE_CANCEL = 2; BATCH_OPERATION_TYPE_SIGNAL = 3; BATCH_OPERATION_TYPE_DELETE = 4; + BATCH_OPERATION_TYPE_RESET = 5; } enum BatchOperationState { diff --git a/temporal/api/enums/v1/reset.proto b/temporal/api/enums/v1/reset.proto index d9dac767..02263e2a 100644 --- a/temporal/api/enums/v1/reset.proto +++ b/temporal/api/enums/v1/reset.proto @@ -39,3 +39,12 @@ enum ResetReapplyType { RESET_REAPPLY_TYPE_SIGNAL = 1; RESET_REAPPLY_TYPE_NONE = 2; } + +// Reset type options +enum ResetType { + RESET_TYPE_UNSPECIFIED = 0; + // Resets to event of the first workflow task completed, or if it does not exist, the event after task scheduled. + RESET_TYPE_FIRST_WORKFLOW_TASK = 1; + // Resets to event of the last workflow task completed, or if it does not exist, the event after task scheduled. + RESET_TYPE_LAST_WORKFLOW_TASK = 2; +} \ No newline at end of file diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 6a7f463f..a4f0c5ad 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1208,6 +1208,7 @@ message StartBatchOperationRequest { temporal.api.batch.v1.BatchOperationSignal signal_operation = 11; temporal.api.batch.v1.BatchOperationCancellation cancellation_operation = 12; temporal.api.batch.v1.BatchOperationDeletion deletion_operation = 13; + temporal.api.batch.v1.BatchOperationReset reset_operation = 14; } }