forked from temporalio/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest_response.proto
1383 lines (1243 loc) · 59.7 KB
/
request_response.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
syntax = "proto3";
package temporal.api.workflowservice.v1;
option go_package = "go.temporal.io/api/workflowservice/v1;workflowservice";
option java_package = "io.temporal.api.workflowservice.v1";
option java_multiple_files = true;
option java_outer_classname = "RequestResponseProto";
option ruby_package = "Temporalio::Api::WorkflowService::V1";
option csharp_namespace = "Temporalio.Api.WorkflowService.V1";
import "temporal/api/enums/v1/batch_operation.proto";
import "temporal/api/enums/v1/workflow.proto";
import "temporal/api/enums/v1/namespace.proto";
import "temporal/api/enums/v1/failed_cause.proto";
import "temporal/api/enums/v1/common.proto";
import "temporal/api/enums/v1/query.proto";
import "temporal/api/enums/v1/reset.proto";
import "temporal/api/enums/v1/task_queue.proto";
import "temporal/api/enums/v1/update.proto";
import "temporal/api/common/v1/message.proto";
import "temporal/api/history/v1/message.proto";
import "temporal/api/workflow/v1/message.proto";
import "temporal/api/command/v1/message.proto";
import "temporal/api/failure/v1/message.proto";
import "temporal/api/filter/v1/message.proto";
import "temporal/api/protocol/v1/message.proto";
import "temporal/api/namespace/v1/message.proto";
import "temporal/api/query/v1/message.proto";
import "temporal/api/replication/v1/message.proto";
import "temporal/api/schedule/v1/message.proto";
import "temporal/api/taskqueue/v1/message.proto";
import "temporal/api/update/v1/message.proto";
import "temporal/api/version/v1/message.proto";
import "temporal/api/batch/v1/message.proto";
import "temporal/api/sdk/v1/task_complete_metadata.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
message RegisterNamespaceRequest {
string namespace = 1;
string description = 2;
string owner_email = 3;
google.protobuf.Duration workflow_execution_retention_period = 4;
repeated temporal.api.replication.v1.ClusterReplicationConfig clusters = 5;
string active_cluster_name = 6;
// A key-value map for any customized purpose.
map<string, string> data = 7;
string security_token = 8;
bool is_global_namespace = 9;
// If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.
temporal.api.enums.v1.ArchivalState history_archival_state = 10;
string history_archival_uri = 11;
// If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.
temporal.api.enums.v1.ArchivalState visibility_archival_state = 12;
string visibility_archival_uri = 13;
}
message RegisterNamespaceResponse {
}
message ListNamespacesRequest {
int32 page_size = 1;
bytes next_page_token = 2;
temporal.api.namespace.v1.NamespaceFilter namespace_filter = 3;
}
message ListNamespacesResponse {
repeated DescribeNamespaceResponse namespaces = 1;
bytes next_page_token = 2;
}
message DescribeNamespaceRequest {
string namespace = 1;
string id = 2;
}
message DescribeNamespaceResponse {
temporal.api.namespace.v1.NamespaceInfo namespace_info = 1;
temporal.api.namespace.v1.NamespaceConfig config = 2;
temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3;
int64 failover_version = 4;
bool is_global_namespace = 5;
// Contains the historical state of failover_versions for the cluster, truncated to contain only the last N
// states to ensure that the list does not grow unbounded.
repeated temporal.api.replication.v1.FailoverStatus failover_history = 6;
}
// (-- api-linter: core::0134::request-mask-required=disabled
// aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --)
// (-- api-linter: core::0134::request-resource-required=disabled
// aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --)
message UpdateNamespaceRequest {
string namespace = 1;
temporal.api.namespace.v1.UpdateNamespaceInfo update_info = 2;
temporal.api.namespace.v1.NamespaceConfig config = 3;
temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 4;
string security_token = 5;
string delete_bad_binary = 6;
// promote local namespace to global namespace. Ignored if namespace is already global namespace.
bool promote_namespace = 7;
}
message UpdateNamespaceResponse {
temporal.api.namespace.v1.NamespaceInfo namespace_info = 1;
temporal.api.namespace.v1.NamespaceConfig config = 2;
temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3;
int64 failover_version = 4;
bool is_global_namespace = 5;
}
// Deprecated.
message DeprecateNamespaceRequest {
string namespace = 1;
string security_token = 2;
}
// Deprecated.
message DeprecateNamespaceResponse {
}
message StartWorkflowExecutionRequest {
string namespace = 1;
string workflow_id = 2;
temporal.api.common.v1.WorkflowType workflow_type = 3;
temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
// Serialized arguments to the workflow. These are passed as arguments to the workflow function.
temporal.api.common.v1.Payloads input = 5;
// Total workflow execution timeout including retries and continue as new.
google.protobuf.Duration workflow_execution_timeout = 6;
// Timeout of a single workflow run.
google.protobuf.Duration workflow_run_timeout = 7;
// Timeout of a single workflow task.
google.protobuf.Duration workflow_task_timeout = 8;
// The identity of the client who initiated this request
string identity = 9;
// A unique identifier for this start request. Typically UUIDv4.
string request_id = 10;
// Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
// The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
temporal.api.common.v1.RetryPolicy retry_policy = 12;
// See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
string cron_schedule = 13;
temporal.api.common.v1.Memo memo = 14;
temporal.api.common.v1.SearchAttributes search_attributes = 15;
temporal.api.common.v1.Header header = 16;
// Request to get the first workflow task inline in the response bypassing matching service and worker polling.
// If set to `true` the caller is expected to have a worker available and capable of processing the task.
// The returned task will be marked as started and is expected to be completed by the specified
// `workflow_task_timeout`.
bool request_eager_execution = 17;
// These values will be available as ContinuedFailure and LastCompletionResult in the
// WorkflowExecutionStarted event and through SDKs. The are currently only used by the
// server itself (for the schedules feature) and are not intended to be exposed in
// StartWorkflowExecution.
temporal.api.failure.v1.Failure continued_failure = 18;
temporal.api.common.v1.Payloads last_completion_result = 19;
// Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.
// If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest
// of the delay will be ignored.
google.protobuf.Duration workflow_start_delay = 20;
}
message StartWorkflowExecutionResponse {
string run_id = 1;
// When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will
// return the first workflow task to be eagerly executed.
// The caller is expected to have a worker available to process the task.
PollWorkflowTaskQueueResponse eager_workflow_task = 2;
}
message GetWorkflowExecutionHistoryRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution execution = 2;
int32 maximum_page_size = 3;
// If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of
// these, it should be passed here to fetch the next page.
bytes next_page_token = 4;
// If set to true, the RPC call will not resolve until there is a new event which matches
// the `history_event_filter_type`, or a timeout is hit.
bool wait_new_event = 5;
// Filter returned events such that they match the specified filter type.
// Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT.
temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6;
bool skip_archival = 7;
}
message GetWorkflowExecutionHistoryResponse {
temporal.api.history.v1.History history = 1;
// Raw history is an alternate representation of history that may be returned if configured on
// the frontend. This is not supported by all SDKs. Either this or `history` will be set.
repeated temporal.api.common.v1.DataBlob raw_history = 2;
// Will be set if there are more history events than were included in this response
bytes next_page_token = 3;
bool archived = 4;
}
message GetWorkflowExecutionHistoryReverseRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution execution = 2;
int32 maximum_page_size = 3;
bytes next_page_token = 4;
}
message GetWorkflowExecutionHistoryReverseResponse {
temporal.api.history.v1.History history = 1;
// Will be set if there are more history events than were included in this response
bytes next_page_token = 3;
}
message PollWorkflowTaskQueueRequest {
string namespace = 1;
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
// The identity of the worker/client who is polling this task queue
string identity = 3;
// DEPRECATED since 1.21 - use `worker_version_capabilities` instead.
// Each worker process should provide an ID unique to the specific set of code it is running
// "checksum" in this field name isn't very accurate, it should be though of as an id.
string binary_checksum = 4;
// Information about this worker's build identifier and if it is choosing to use the versioning
// feature. See the `WorkerVersionCapabilities` docstring for more.
temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5;
}
message PollWorkflowTaskQueueResponse {
// A unique identifier for this task
bytes task_token = 1;
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
temporal.api.common.v1.WorkflowType workflow_type = 3;
// The last workflow task started event which was processed by some worker for this execution.
// Will be zero if no task has ever started.
int64 previous_started_event_id = 4;
// The id of the most recent workflow task started event, which will have been generated as a
// result of this poll request being served. Will be zero if the task
// does not contain any events which would advance history (no new WFT started).
// Currently this can happen for queries.
int64 started_event_id = 5;
// Starting at 1, the number of attempts to complete this task by any worker.
int32 attempt = 6;
// A hint that there are more tasks already present in this task queue. Can be used to
// prioritize draining a sticky queue before polling from a normal queue.
int64 backlog_count_hint = 7;
// The history for this workflow, which will either be complete or partial. Partial histories
// are sent to workers who have signaled that they are using a sticky queue when completing
// a workflow task.
temporal.api.history.v1.History history = 8;
// Will be set if there are more history events than were included in this response. Such events
// should be fetched via `GetWorkflowExecutionHistory`.
bytes next_page_token = 9;
// Legacy queries appear in this field. The query must be responded to via
// `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on
// closed workflows) then the `history` field will be populated with the entire history. It
// may also be populated if this task originates on a non-sticky queue.
temporal.api.query.v1.WorkflowQuery query = 10;
// The task queue this task originated from, which will always be the original non-sticky name
// for the queue, even if this response came from polling a sticky queue.
temporal.api.taskqueue.v1.TaskQueue workflow_execution_task_queue = 11;
// When this task was scheduled by the server
google.protobuf.Timestamp scheduled_time = 12;
// When the current workflow task started event was generated, meaning the current attempt.
google.protobuf.Timestamp started_time = 13;
// Queries that should be executed after applying the history in this task. Responses should be
// attached to `RespondWorkflowTaskCompletedRequest::query_results`
map<string, temporal.api.query.v1.WorkflowQuery> queries = 14;
// Protocol messages piggybacking on a WFT as a transport
repeated temporal.api.protocol.v1.Message messages = 15;
}
message RespondWorkflowTaskCompletedRequest {
// The task token as received in `PollWorkflowTaskQueueResponse`
bytes task_token = 1;
// A list of commands generated when driving the workflow code in response to the new task
repeated temporal.api.command.v1.Command commands = 2;
// The identity of the worker/client
string identity = 3;
// May be set by workers to indicate that the worker desires future tasks to be provided with
// incremental history on a sticky queue.
temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4;
// If set, the worker wishes to immediately receive the next workflow task as a response to
// this completion. This can save on polling round-trips.
bool return_new_workflow_task = 5;
// Can be used to *force* creation of a new workflow task, even if no commands have resolved or
// one would not otherwise have been generated. This is used when the worker knows it is doing
// something useful, but cannot complete it within the workflow task timeout. Local activities
// which run for longer than the task timeout being the prime example.
bool force_create_new_workflow_task = 6;
// DEPRECATED since 1.21 - use `worker_version_stamp` instead.
// Worker process' unique binary id
string binary_checksum = 7;
// Responses to the `queries` field in the task being responded to
map<string, temporal.api.query.v1.WorkflowQueryResult> query_results = 8;
string namespace = 9;
// Version info of the worker who processed this task. This message's `build_id` field should
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
// field to true. See message docstrings for more.
temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10;
// Protocol messages piggybacking on a WFT as a transport
repeated temporal.api.protocol.v1.Message messages = 11;
// Data the SDK wishes to record for itself, but server need not interpret, and does not
// directly impact workflow state.
temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 12;
// Local usage data collected for metering
temporal.api.common.v1.MeteringMetadata metering_metadata = 13;
}
message RespondWorkflowTaskCompletedResponse {
// See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task`
PollWorkflowTaskQueueResponse workflow_task = 1;
// See `ScheduleActivityTaskCommandAttributes::request_start`
repeated PollActivityTaskQueueResponse activity_tasks = 2;
int64 reset_history_event_id = 3;
}
message RespondWorkflowTaskFailedRequest {
// The task token as received in `PollWorkflowTaskQueueResponse`
bytes task_token = 1;
// Why did the task fail? It's important to note that many of the variants in this enum cannot
// apply to worker responses. See the type's doc for more.
temporal.api.enums.v1.WorkflowTaskFailedCause cause = 2;
// Failure details
temporal.api.failure.v1.Failure failure = 3;
// The identity of the worker/client
string identity = 4;
// DEPRECATED since 1.21 - use `worker_version_stamp` instead.
// Worker process' unique binary id
string binary_checksum = 5;
string namespace = 6;
// Protocol messages piggybacking on a WFT as a transport
repeated temporal.api.protocol.v1.Message messages = 7;
// Version info of the worker who processed this task. This message's `build_id` field should
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
// field to true. See message docstrings for more.
temporal.api.common.v1.WorkerVersionStamp worker_version = 8;
}
message RespondWorkflowTaskFailedResponse {
}
message PollActivityTaskQueueRequest {
string namespace = 1;
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
// The identity of the worker/client
string identity = 3;
temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4;
// Information about this worker's build identifier and if it is choosing to use the versioning
// feature. See the `WorkerVersionCapabilities` docstring for more.
temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5;
}
message PollActivityTaskQueueResponse {
// A unique identifier for this task
bytes task_token = 1;
// The namespace the workflow which requested this activity lives in
string workflow_namespace = 2;
// Type of the requesting workflow
temporal.api.common.v1.WorkflowType workflow_type = 3;
// Execution info of the requesting workflow
temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
temporal.api.common.v1.ActivityType activity_type = 5;
// The autogenerated or user specified identifier of this activity. Can be used to complete the
// activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage
// has resolved, but unique IDs for every activity invocation is a good idea.
string activity_id = 6;
// Headers specified by the scheduling workflow. Commonly used to propagate contextual info
// from the workflow to its activities. For example, tracing contexts.
temporal.api.common.v1.Header header = 7;
// Arguments to the activity invocation
temporal.api.common.v1.Payloads input = 8;
// Details of the last heartbeat that was recorded for this activity as of the time this task
// was delivered.
temporal.api.common.v1.Payloads heartbeat_details = 9;
// When was this task first scheduled
google.protobuf.Timestamp scheduled_time = 10;
// When was this task attempt scheduled
google.protobuf.Timestamp current_attempt_scheduled_time = 11;
// When was this task started (this attempt)
google.protobuf.Timestamp started_time = 12;
// Starting at 1, the number of attempts to perform this activity
int32 attempt = 13;
// First scheduled -> final result reported timeout
//
// (-- api-linter: core::0140::prepositions=disabled
// aip.dev/not-precedent: "to" is used to indicate interval. --)
google.protobuf.Duration schedule_to_close_timeout = 14;
// Current attempt start -> final result reported timeout
//
// (-- api-linter: core::0140::prepositions=disabled
// aip.dev/not-precedent: "to" is used to indicate interval. --)
google.protobuf.Duration start_to_close_timeout = 15;
// Window within which the activity must report a heartbeat, or be timed out.
google.protobuf.Duration heartbeat_timeout = 16;
// This is the retry policy the service uses which may be different from the one provided
// (or not) during activity scheduling. The service can override the provided one if some
// values are not specified or exceed configured system limits.
temporal.api.common.v1.RetryPolicy retry_policy = 17;
}
message RecordActivityTaskHeartbeatRequest {
// The task token as received in `PollActivityTaskQueueResponse`
bytes task_token = 1;
// Arbitrary data, of which the most recent call is kept, to store for this activity
temporal.api.common.v1.Payloads details = 2;
// The identity of the worker/client
string identity = 3;
string namespace = 4;
}
message RecordActivityTaskHeartbeatResponse {
// Will be set to true if the activity has been asked to cancel itself. The SDK should then
// notify the activity of cancellation if it is still running.
bool cancel_requested = 1;
}
message RecordActivityTaskHeartbeatByIdRequest {
// Namespace of the workflow which scheduled this activity
string namespace = 1;
// Id of the workflow which scheduled this activity
string workflow_id = 2;
// Run Id of the workflow which scheduled this activity
string run_id = 3;
// Id of the activity we're heartbeating
string activity_id = 4;
// Arbitrary data, of which the most recent call is kept, to store for this activity
temporal.api.common.v1.Payloads details = 5;
// The identity of the worker/client
string identity = 6;
}
message RecordActivityTaskHeartbeatByIdResponse {
// Will be set to true if the activity has been asked to cancel itself. The SDK should then
// notify the activity of cancellation if it is still running.
bool cancel_requested = 1;
}
message RespondActivityTaskCompletedRequest {
// The task token as received in `PollActivityTaskQueueResponse`
bytes task_token = 1;
// The result of successfully executing the activity
temporal.api.common.v1.Payloads result = 2;
// The identity of the worker/client
string identity = 3;
string namespace = 4;
// Version info of the worker who processed this task. This message's `build_id` field should
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
// field to true. See message docstrings for more.
temporal.api.common.v1.WorkerVersionStamp worker_version = 5;
}
message RespondActivityTaskCompletedResponse {
}
message RespondActivityTaskCompletedByIdRequest {
// Namespace of the workflow which scheduled this activity
string namespace = 1;
// Id of the workflow which scheduled this activity
string workflow_id = 2;
// Run Id of the workflow which scheduled this activity
string run_id = 3;
// Id of the activity to complete
string activity_id = 4;
// The serialized result of activity execution
temporal.api.common.v1.Payloads result = 5;
// The identity of the worker/client
string identity = 6;
}
message RespondActivityTaskCompletedByIdResponse {
}
message RespondActivityTaskFailedRequest {
// The task token as received in `PollActivityTaskQueueResponse`
bytes task_token = 1;
// Detailed failure information
temporal.api.failure.v1.Failure failure = 2;
// The identity of the worker/client
string identity = 3;
string namespace = 4;
// Additional details to be stored as last activity heartbeat
temporal.api.common.v1.Payloads last_heartbeat_details = 5;
// Version info of the worker who processed this task. This message's `build_id` field should
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
// field to true. See message docstrings for more.
temporal.api.common.v1.WorkerVersionStamp worker_version = 6;
}
message RespondActivityTaskFailedResponse {
// Server validation failures could include
// last_heartbeat_details payload is too large, request failure is too large
repeated temporal.api.failure.v1.Failure failures = 1;
}
message RespondActivityTaskFailedByIdRequest {
// Namespace of the workflow which scheduled this activity
string namespace = 1;
// Id of the workflow which scheduled this activity
string workflow_id = 2;
// Run Id of the workflow which scheduled this activity
string run_id = 3;
// Id of the activity to fail
string activity_id = 4;
// Detailed failure information
temporal.api.failure.v1.Failure failure = 5;
// The identity of the worker/client
string identity = 6;
// Additional details to be stored as last activity heartbeat
temporal.api.common.v1.Payloads last_heartbeat_details = 7;
}
message RespondActivityTaskFailedByIdResponse {
// Server validation failures could include
// last_heartbeat_details payload is too large, request failure is too large
repeated temporal.api.failure.v1.Failure failures = 1;
}
message RespondActivityTaskCanceledRequest {
// The task token as received in `PollActivityTaskQueueResponse`
bytes task_token = 1;
// Serialized additional information to attach to the cancellation
temporal.api.common.v1.Payloads details = 2;
// The identity of the worker/client
string identity = 3;
string namespace = 4;
// Version info of the worker who processed this task. This message's `build_id` field should
// always be set by SDKs. Workers opting into versioning will also set the `use_versioning`
// field to true. See message docstrings for more.
temporal.api.common.v1.WorkerVersionStamp worker_version = 5;
}
message RespondActivityTaskCanceledResponse {
}
message RespondActivityTaskCanceledByIdRequest {
// Namespace of the workflow which scheduled this activity
string namespace = 1;
// Id of the workflow which scheduled this activity
string workflow_id = 2;
// Run Id of the workflow which scheduled this activity
string run_id = 3;
// Id of the activity to confirm is cancelled
string activity_id = 4;
// Serialized additional information to attach to the cancellation
temporal.api.common.v1.Payloads details = 5;
// The identity of the worker/client
string identity = 6;
}
message RespondActivityTaskCanceledByIdResponse {
}
message RequestCancelWorkflowExecutionRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
// The identity of the worker/client
string identity = 3;
// Used to de-dupe cancellation requests
string request_id = 4;
// If set, this call will error if the most recent (if no run id is set on
// `workflow_execution`), or specified (if it is) workflow execution is not part of the same
// execution chain as this id.
string first_execution_run_id = 5;
// Reason for requesting the cancellation
string reason = 6;
}
message RequestCancelWorkflowExecutionResponse {
}
message SignalWorkflowExecutionRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
// The workflow author-defined name of the signal to send to the workflow
string signal_name = 3;
// Serialized value(s) to provide with the signal
temporal.api.common.v1.Payloads input = 4;
// The identity of the worker/client
string identity = 5;
// Used to de-dupe sent signals
string request_id = 6;
// Deprecated
string control = 7;
// Headers that are passed with the signal to the processing workflow.
// These can include things like auth or tracing tokens.
temporal.api.common.v1.Header header = 8;
// Indicates that a new workflow task should not be generated when this signal is received.
bool skip_generate_workflow_task = 9;
}
message SignalWorkflowExecutionResponse {
}
message SignalWithStartWorkflowExecutionRequest {
string namespace = 1;
string workflow_id = 2;
temporal.api.common.v1.WorkflowType workflow_type = 3;
// The task queue to start this workflow on, if it will be started
temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
// Serialized arguments to the workflow. These are passed as arguments to the workflow function.
temporal.api.common.v1.Payloads input = 5;
// Total workflow execution timeout including retries and continue as new
google.protobuf.Duration workflow_execution_timeout = 6;
// Timeout of a single workflow run
google.protobuf.Duration workflow_run_timeout = 7;
// Timeout of a single workflow task
google.protobuf.Duration workflow_task_timeout = 8;
// The identity of the worker/client
string identity = 9;
// Used to de-dupe signal w/ start requests
string request_id = 10;
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
// The workflow author-defined name of the signal to send to the workflow
string signal_name = 12;
// Serialized value(s) to provide with the signal
temporal.api.common.v1.Payloads signal_input = 13;
// Deprecated
string control = 14;
// Retry policy for the workflow Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
temporal.api.common.v1.RetryPolicy retry_policy = 15;
// See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
string cron_schedule = 16;
temporal.api.common.v1.Memo memo = 17;
temporal.api.common.v1.SearchAttributes search_attributes = 18;
temporal.api.common.v1.Header header = 19;
// Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.
// Note that the signal will be delivered with the first workflow task. If the workflow gets
// another SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false
// or not set, a workflow task will be dispatched immediately and the rest of the delay period
// will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution
// will not unblock the workflow.
google.protobuf.Duration workflow_start_delay = 20;
// Indicates that a new workflow task should not be generated when this signal is received.
bool skip_generate_workflow_task = 21;
}
message SignalWithStartWorkflowExecutionResponse {
string run_id = 1;
}
message ResetWorkflowExecutionRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
string reason = 3;
// The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or
// `WORKFLOW_TASK_STARTED` event to reset to.
int64 workflow_task_finish_event_id = 4;
// Used to de-dupe reset requests
string request_id = 5;
// Event types to be reapplied (deprecated)
// Default: RESET_REAPPLY_TYPE_ALL_ELIGIBLE
temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6;
// Event types not to be reapplied
repeated temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7;
}
message ResetWorkflowExecutionResponse {
string run_id = 1;
}
message TerminateWorkflowExecutionRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
string reason = 3;
// Serialized additional information to attach to the termination event
temporal.api.common.v1.Payloads details = 4;
// The identity of the worker/client
string identity = 5;
// If set, this call will error if the most recent (if no run id is set on
// `workflow_execution`), or specified (if it is) workflow execution is not part of the same
// execution chain as this id.
string first_execution_run_id = 6;
}
message TerminateWorkflowExecutionResponse {
}
// (-- api-linter: core::0135::request-unknown-fields=disabled
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
// (-- api-linter: core::0135::request-name-required=disabled
// aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
message DeleteWorkflowExecutionRequest {
string namespace = 1;
// Workflow Execution to delete. If run_id is not specified, the latest one is used.
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
}
message DeleteWorkflowExecutionResponse {
}
message ListOpenWorkflowExecutionsRequest {
string namespace = 1;
int32 maximum_page_size = 2;
bytes next_page_token = 3;
temporal.api.filter.v1.StartTimeFilter start_time_filter = 4;
oneof filters {
temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5;
temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6;
}
}
message ListOpenWorkflowExecutionsResponse {
repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
bytes next_page_token = 2;
}
message ListClosedWorkflowExecutionsRequest {
string namespace = 1;
int32 maximum_page_size = 2;
bytes next_page_token = 3;
temporal.api.filter.v1.StartTimeFilter start_time_filter = 4;
oneof filters {
temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5;
temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6;
temporal.api.filter.v1.StatusFilter status_filter = 7;
}
}
message ListClosedWorkflowExecutionsResponse {
repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
bytes next_page_token = 2;
}
message ListWorkflowExecutionsRequest {
string namespace = 1;
int32 page_size = 2;
bytes next_page_token = 3;
string query = 4;
}
message ListWorkflowExecutionsResponse {
repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
bytes next_page_token = 2;
}
message ListArchivedWorkflowExecutionsRequest {
string namespace = 1;
int32 page_size = 2;
bytes next_page_token = 3;
string query = 4;
}
message ListArchivedWorkflowExecutionsResponse {
repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
bytes next_page_token = 2;
}
message ScanWorkflowExecutionsRequest {
string namespace = 1;
int32 page_size = 2;
bytes next_page_token = 3;
string query = 4;
}
message ScanWorkflowExecutionsResponse {
repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
bytes next_page_token = 2;
}
message CountWorkflowExecutionsRequest {
string namespace = 1;
string query = 2;
}
message CountWorkflowExecutionsResponse {
// If `query` is not grouping by any field, the count is an approximate number
// of workflows that matches the query.
// If `query` is grouping by a field, the count is simply the sum of the counts
// of the groups returned in the response. This number can be smaller than the
// total number of workflows matching the query.
int64 count = 1;
// `groups` contains the groups if the request is grouping by a field.
// The list might not be complete, and the counts of each group is approximate.
repeated AggregationGroup groups = 2;
message AggregationGroup {
repeated temporal.api.common.v1.Payload group_values = 1;
int64 count = 2;
}
}
message GetSearchAttributesRequest {
}
message GetSearchAttributesResponse {
map<string, temporal.api.enums.v1.IndexedValueType> keys = 1;
}
message RespondQueryTaskCompletedRequest {
bytes task_token = 1;
temporal.api.enums.v1.QueryResultType completed_type = 2;
temporal.api.common.v1.Payloads query_result = 3;
string error_message = 4;
reserved 5;
string namespace = 6;
}
message RespondQueryTaskCompletedResponse {
}
message ResetStickyTaskQueueRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution execution = 2;
}
message ResetStickyTaskQueueResponse {
}
message QueryWorkflowRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution execution = 2;
temporal.api.query.v1.WorkflowQuery query = 3;
// QueryRejectCondition can used to reject the query if workflow state does not satisfy condition.
// Default: QUERY_REJECT_CONDITION_NONE.
temporal.api.enums.v1.QueryRejectCondition query_reject_condition = 4;
}
message QueryWorkflowResponse {
temporal.api.common.v1.Payloads query_result = 1;
temporal.api.query.v1.QueryRejected query_rejected = 2;
}
message DescribeWorkflowExecutionRequest {
string namespace = 1;
temporal.api.common.v1.WorkflowExecution execution = 2;
}
message DescribeWorkflowExecutionResponse {
temporal.api.workflow.v1.WorkflowExecutionConfig execution_config = 1;
temporal.api.workflow.v1.WorkflowExecutionInfo workflow_execution_info = 2;
repeated temporal.api.workflow.v1.PendingActivityInfo pending_activities = 3;
repeated temporal.api.workflow.v1.PendingChildExecutionInfo pending_children = 4;
temporal.api.workflow.v1.PendingWorkflowTaskInfo pending_workflow_task = 5;
}
message DescribeTaskQueueRequest {
string namespace = 1;
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
// If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.
temporal.api.enums.v1.TaskQueueType task_queue_type = 3;
bool include_task_queue_status = 4;
}
message DescribeTaskQueueResponse {
repeated temporal.api.taskqueue.v1.PollerInfo pollers = 1;
temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2;
}
message GetClusterInfoRequest {
}
// GetClusterInfoResponse contains information about Temporal cluster.
message GetClusterInfoResponse {
// Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli".
// Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0".
map<string,string> supported_clients = 1;
string server_version = 2;
string cluster_id = 3;
temporal.api.version.v1.VersionInfo version_info = 4;
string cluster_name = 5;
int32 history_shard_count = 6;
string persistence_store = 7;
string visibility_store = 8;
}
message GetSystemInfoRequest {
}
message GetSystemInfoResponse {
// Version of the server.
string server_version = 1;
// All capabilities the system supports.
Capabilities capabilities = 2;
// System capability details.
message Capabilities {
// True if signal and query headers are supported.
bool signal_and_query_header = 1;
// True if internal errors are differentiated from other types of errors for purposes of
// retrying non-internal errors.
//
// When unset/false, clients retry all failures. When true, clients should only retry
// non-internal errors.
bool internal_error_differentiation = 2;
// True if RespondActivityTaskFailed API supports including heartbeat details
bool activity_failure_include_heartbeat = 3;
// Supports scheduled workflow features.
bool supports_schedules = 4;
// True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes
bool encoded_failure_attributes = 5;
// True if server supports dispatching Workflow and Activity tasks based on a worker's build_id
// (see:
// https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md)
bool build_id_based_versioning = 6;
// True if server supports upserting workflow memo
bool upsert_memo = 7;
// True if server supports eager workflow task dispatching for the StartWorkflowExecution API
bool eager_workflow_start = 8;
// True if the server knows about the sdk metadata field on WFT completions and will record
// it in history
bool sdk_metadata = 9;
// True if the server supports count group by execution status
// (-- api-linter: core::0140::prepositions=disabled --)
bool count_group_by_execution_status = 10;
}
}
message ListTaskQueuePartitionsRequest {
string namespace = 1;
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
}
message ListTaskQueuePartitionsResponse {
repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata activity_task_queue_partitions = 1;
repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata workflow_task_queue_partitions = 2;
}
// (-- api-linter: core::0133::request-parent-required=disabled
// aip.dev/not-precedent: CreateSchedule doesn't follow Google API format --)
// (-- api-linter: core::0133::request-unknown-fields=disabled
// aip.dev/not-precedent: CreateSchedule doesn't follow Google API format --)
// (-- api-linter: core::0133::request-resource-behavior=disabled
// aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
// (-- api-linter: core::0203::optional=disabled
// aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
message CreateScheduleRequest {
// The namespace the schedule should be created in.
string namespace = 1;
// The id of the new schedule.
string schedule_id = 2;
// The schedule spec, policies, action, and initial state.
temporal.api.schedule.v1.Schedule schedule = 3;
// Optional initial patch (e.g. to run the action once immediately).
temporal.api.schedule.v1.SchedulePatch initial_patch = 4;
// The identity of the client who initiated this request.
string identity = 5;
// A unique identifier for this create request for idempotence. Typically UUIDv4.
string request_id = 6;
// Memo and search attributes to attach to the schedule itself.
temporal.api.common.v1.Memo memo = 7;
temporal.api.common.v1.SearchAttributes search_attributes = 8;
}
message CreateScheduleResponse {
bytes conflict_token = 1;
}
message DescribeScheduleRequest {
// The namespace of the schedule to describe.
string namespace = 1;
// The id of the schedule to describe.
string schedule_id = 2;
}
message DescribeScheduleResponse {
// The complete current schedule details. This may not match the schedule as
// created because:
// - some types of schedule specs may get compiled into others (e.g.
// CronString into StructuredCalendarSpec)
// - some unspecified fields may be replaced by defaults
// - some fields in the state are modified automatically
// - the schedule may have been modified by UpdateSchedule or PatchSchedule
temporal.api.schedule.v1.Schedule schedule = 1;
// Extra schedule state info.
temporal.api.schedule.v1.ScheduleInfo info = 2;
// The memo and search attributes that the schedule was created with.
temporal.api.common.v1.Memo memo = 3;