-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathrequest_response.proto
More file actions
3010 lines (2651 loc) · 133 KB
/
request_response.proto
File metadata and controls
3010 lines (2651 loc) · 133 KB
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
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/common.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/query.proto";
import "temporal/api/enums/v1/reset.proto";
import "temporal/api/enums/v1/task_queue.proto";
import "temporal/api/enums/v1/deployment.proto";
import "temporal/api/enums/v1/update.proto";
import "temporal/api/enums/v1/activity.proto";
import "temporal/api/activity/v1/message.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/deployment/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/rules/v1/message.proto";
import "temporal/api/sdk/v1/worker_config.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 "temporal/api/sdk/v1/user_metadata.proto";
import "temporal/api/nexus/v1/message.proto";
import "temporal/api/worker/v1/message.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.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;
}
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;
// Defines whether to allow re-using the workflow id from a previously *closed* workflow.
// The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
//
// See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow.
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
// Defines how to resolve a workflow id conflict with a *running* workflow.
// The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL.
//
// See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow.
temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22;
// 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;
// Callbacks to be called by the server when this workflow reaches a terminal state.
// If the workflow continues-as-new, these callbacks will be carried over to the new execution.
// Callback addresses must be whitelisted in the server's dynamic configuration.
repeated temporal.api.common.v1.Callback completion_callbacks = 21;
// Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo
// for use by user interfaces to display the fixed as-of-start summary and details of the
// workflow.
temporal.api.sdk.v1.UserMetadata user_metadata = 23;
// Links to be associated with the workflow.
repeated temporal.api.common.v1.Link links = 24;
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
temporal.api.workflow.v1.VersioningOverride versioning_override = 25;
// Defines actions to be done to the existing running workflow when the conflict policy
// WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a
// empty object (ie., all options with default value), it won't do anything to the existing
// running workflow. If set, it will add a history event to the running workflow.
temporal.api.workflow.v1.OnConflictOptions on_conflict_options = 26;
// Priority metadata
temporal.api.common.v1.Priority priority = 27;
// Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`.
temporal.api.deployment.v1.WorkerDeploymentOptions eager_worker_deployment_options = 28;
}
message StartWorkflowExecutionResponse {
// The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING).
string run_id = 1;
// If true, a new workflow was started.
bool started = 3;
// Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING
// unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs).
temporal.api.enums.v1.WorkflowExecutionStatus status = 5;
// 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;
// Link to the workflow event.
temporal.api.common.v1.Link link = 4;
}
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;
// Client must pass one of the poller group IDs received in `poller_group_infos` of the last
// the PollWorkflowTaskQueueResponse according to the instructions. If not set, the poll is
// routed randomly which can cause it being blocked without receiving a task while the queue
// actually has tasks in another server location.
string poller_group_id = 9;
// The identity of the worker/client who is polling this task queue
string identity = 3;
// A unique key for this worker instance, used for tracking worker lifecycle.
// This is guaranteed to be unique, whereas identity is not guaranteed to be unique.
string worker_instance_key = 8;
// Deprecated. Use deployment_options 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 [deprecated = true];
// Deprecated. Use deployment_options instead.
// 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 [deprecated = true];
// Worker deployment options that user has set in the worker.
// Experimental. Worker Deployments are experimental and might significantly change in the future.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6;
// Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat
reserved 7;
reserved "worker_heartbeat";
}
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
// partition. Can be used to prioritize draining a sticky queue.
//
// Specifically, the returned number is the number of tasks remaining in
// the in-memory buffer for this partition, which is currently capped at
// 1000. Because sticky queues only have one partition, this number is
// more useful when draining them. Normal queues, typically having more than one
// partition, will return a number representing only some portion of the
// overall backlog. Subsequent RPCs may not hit the same partition as
// this call.
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;
// Server-advised information the SDK may use to adjust its poller count.
temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 16;
// This poller group ID identifies the owner of the workflow task awaiting for query response.
// Corresponding RespondQueryTaskCompleted should pass this value for proper routing.
string poller_group_id = 17;
// The weighted list of poller groups IDs that client should use for future polls to this task
// queue. Client is expected to:
// 1. Maintain minimum number of pollers no less than the number of groups.
// 2. Try to assign the next poll to a group without any pending polls,
// 3. If every group has some pending polls, assign the next poll to a group randomly
// according to the weights.
repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 18;
}
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. Use `deployment_options` instead.
// Worker process' unique binary id
string binary_checksum = 7 [deprecated = true];
// Responses to the `queries` field in the task being responded to
map<string, temporal.api.query.v1.WorkflowQueryResult> query_results = 8;
string namespace = 9;
// Resource ID for routing. Contains the workflow ID from the original task.
string resource_id = 18;
// 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.
// Deprecated. Use `deployment_options` and `versioning_behavior` instead.
temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10 [deprecated = true];
// 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;
// All capabilities the SDK supports.
Capabilities capabilities = 14;
// Deployment info of the worker that completed this task. Must be present if user has set
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
// Deprecated. Replaced with `deployment_options`.
temporal.api.deployment.v1.Deployment deployment = 15 [deprecated = true];
// Versioning behavior of this workflow execution as set on the worker that completed this task.
// UNSPECIFIED means versioning is not enabled in the worker.
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 16;
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 17;
// SDK capability details.
message Capabilities {
// True if the SDK can handle speculative workflow task with command events. If true, the
// server may choose, at its discretion, to discard a speculative workflow task even if that
// speculative task included command events the SDK had not previously processed.
//
// (-- api-linter: core::0140::prepositions=disabled
// aip.dev/not-precedent: "with" used to describe the workflow task. --)
bool discard_speculative_workflow_task_with_events = 1;
}
}
message RespondWorkflowTaskCompletedResponse {
// See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task`
PollWorkflowTaskQueueResponse workflow_task = 1;
// See `ScheduleActivityTaskCommandAttributes::request_eager_execution`
repeated PollActivityTaskQueueResponse activity_tasks = 2;
// If non zero, indicates the server has discarded the workflow task that was being responded to.
// Will be the event ID of the last workflow task started event in the history before the new workflow task.
// Server is only expected to discard a workflow task if it could not have modified the workflow state.
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. Use `deployment_options` instead.
// Worker process' unique binary id
string binary_checksum = 5 [deprecated = true];
string namespace = 6;
// Resource ID for routing. Contains the workflow ID from the original task.
string resource_id = 11;
// 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.
// Deprecated. Use `deployment_options` instead.
temporal.api.common.v1.WorkerVersionStamp worker_version = 8 [deprecated = true];
// Deployment info of the worker that completed this task. Must be present if user has set
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
// Deprecated. Replaced with `deployment_options`.
temporal.api.deployment.v1.Deployment deployment = 9 [deprecated = true];
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 10;
}
message RespondWorkflowTaskFailedResponse {
}
message PollActivityTaskQueueRequest {
string namespace = 1;
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
// Client must pass one of the poller group IDs received in `poller_group_infos` of the last
// the PollActivityTaskQueueResponse according to the instructions. If not set, the poll is
// routed randomly which can cause it being blocked without receiving a task while the queue
// actually has tasks in another server location.
string poller_group_id = 9;
// The identity of the worker/client
string identity = 3;
// A unique key for this worker instance, used for tracking worker lifecycle.
// This is guaranteed to be unique, whereas identity is not guaranteed to be unique.
string worker_instance_key = 8;
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.
// Deprecated. Replaced by deployment_options.
temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5 [deprecated = true];
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6;
// Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat
reserved 7;
reserved "worker_heartbeat";
}
message PollActivityTaskQueueResponse {
// A unique identifier for this task
bytes task_token = 1;
// The namespace of the activity. If this is a workflow activity then this is the namespace of
// the workflow also. If this is a standalone activity then the name of this field is
// misleading, but retained for compatibility with workflow activities.
string workflow_namespace = 2;
// Type of the requesting workflow (if this is a workflow activity).
temporal.api.common.v1.WorkflowType workflow_type = 3;
// Execution info of the requesting workflow (if this is a workflow activity)
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.
// Note that only a workflow activity ID may be autogenerated.
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;
// Server-advised information the SDK may use to adjust its poller count.
temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 18;
// Priority metadata
temporal.api.common.v1.Priority priority = 19;
// The run ID of the activity execution, only set for standalone activities.
string activity_run_id = 20;
// The weighted list of poller groups IDs that client should use for future polls to this task
// queue. Client is expected to:
// 1. Maintain minimum number of pollers no less than the number of groups.
// 2. Try to assign the next poll to a group without any pending polls,
// 3. If every group has some pending polls, assign the next poll to a group randomly
// according to the weights.
repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 21;
}
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;
// Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.
string resource_id = 5;
}
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;
// Will be set to true if the activity is paused.
bool activity_paused = 2;
// Will be set to true if the activity was reset.
// Applies only to the current run.
bool activity_reset = 3;
}
message RecordActivityTaskHeartbeatByIdRequest {
// Namespace of the workflow which scheduled this activity
string namespace = 1;
// Id of the workflow which scheduled this activity, leave empty to target a standalone activity
string workflow_id = 2;
// For a workflow activity - the run ID of the workflow which scheduled this activity.
// For a standalone activity - the run ID of the 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;
// Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.
string resource_id = 7;
}
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;
// Will be set to true if the activity is paused.
bool activity_paused = 2;
// Will be set to true if the activity was reset.
// Applies only to the current run.
bool activity_reset = 3;
}
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;
// Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.
string resource_id = 8;
// 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.
// Deprecated. Use `deployment_options` instead.
temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true];
// Deployment info of the worker that completed this task. Must be present if user has set
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
// Deprecated. Replaced with `deployment_options`.
temporal.api.deployment.v1.Deployment deployment = 6 [deprecated = true];
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 7;
}
message RespondActivityTaskCompletedResponse {
}
message RespondActivityTaskCompletedByIdRequest {
// Namespace of the workflow which scheduled this activity
string namespace = 1;
// Id of the workflow which scheduled this activity, leave empty to target a standalone activity
string workflow_id = 2;
// For a workflow activity - the run ID of the workflow which scheduled this activity.
// For a standalone activity - the run ID of the 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;
// Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.
string resource_id = 7;
}
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;
// Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.
string resource_id = 9;
// 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.
// Deprecated. Use `deployment_options` instead.
temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
// Deployment info of the worker that completed this task. Must be present if user has set
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
// Deprecated. Replaced with `deployment_options`.
temporal.api.deployment.v1.Deployment deployment = 7 [deprecated = true];
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 8;
}
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, leave empty to target a standalone activity
string workflow_id = 2;
// For a workflow activity - the run ID of the workflow which scheduled this activity.
// For a standalone activity - the run ID of the 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;
// Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.
string resource_id = 8;
}
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;
// Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.
string resource_id = 8;
// 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.
// Deprecated. Use `deployment_options` instead.
temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true];
// Deployment info of the worker that completed this task. Must be present if user has set
// `WorkerDeploymentOptions` regardless of versioning being enabled or not.
// Deprecated. Replaced with `deployment_options`.
temporal.api.deployment.v1.Deployment deployment = 6 [deprecated = true];
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 7;
}
message RespondActivityTaskCanceledResponse {
}
message RespondActivityTaskCanceledByIdRequest {
// Namespace of the workflow which scheduled this activity
string namespace = 1;
// Id of the workflow which scheduled this activity, leave empty to target a standalone activity
string workflow_id = 2;
// For a workflow activity - the run ID of the workflow which scheduled this activity.
// For a standalone activity - the run ID of the 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;
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 7;
// Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.
string resource_id = 8;
}
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;
// Links to be associated with the WorkflowExecutionCanceled event.
repeated temporal.api.common.v1.Link links = 7;
}
message RequestCancelWorkflowExecutionResponse {
}
// Keep the parameters in sync with:
// - temporal.api.batch.v1.BatchOperationSignal.
// - temporal.api.workflow.v1.PostResetOperation.SignalWorkflow.
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 [deprecated = true];
// 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;
reserved 9;
// Links to be associated with the WorkflowExecutionSignaled event.
repeated temporal.api.common.v1.Link links = 10;
}
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;
// Defines whether to allow re-using the workflow id from a previously *closed* workflow.
// The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
//
// See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow.
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
// Defines how to resolve a workflow id conflict with a *running* workflow.
// The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING.
// Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option.
//
// See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow.
temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22;
// 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 [deprecated = true];
// Retry policy for the workflow
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 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;
reserved 21;
// Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo
// for use by user interfaces to display the fixed as-of-start summary and details of the
// workflow.
temporal.api.sdk.v1.UserMetadata user_metadata = 23;
// Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events.
repeated temporal.api.common.v1.Link links = 24;
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
temporal.api.workflow.v1.VersioningOverride versioning_override = 25;
// Priority metadata
temporal.api.common.v1.Priority priority = 26;
}
message SignalWithStartWorkflowExecutionResponse {
// The run id of the workflow that was started - or just signaled, if it was already running.
string run_id = 1;
// If true, a new workflow was started.
bool started = 2;
}
message ResetWorkflowExecutionRequest {
string namespace = 1;
// The workflow to reset. If this contains a run ID then the workflow will be reset back to the
// provided event ID in that run. Otherwise it will be reset to the provided event ID in the
// current run. In all cases the current run will be terminated and a new run started.
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;
// Deprecated. Use `options`.
// Default: RESET_REAPPLY_TYPE_SIGNAL
temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6 [deprecated = true];
// Event types not to be reapplied
repeated temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7;
// Operations to perform after the workflow has been reset. These operations will be applied
// to the *new* run of the workflow execution in the order they are provided.
// All operations are applied to the workflow before the first new workflow task is generated
repeated temporal.api.workflow.v1.PostResetOperation post_reset_operations = 8;
// The identity of the worker/client
string identity = 9;
}
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;
// Links to be associated with the WorkflowExecutionTerminated event.
repeated temporal.api.common.v1.Link links = 7;
}
message TerminateWorkflowExecutionResponse {
}
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;
}
// Deprecated: Use with `ListWorkflowExecutions`.
message ScanWorkflowExecutionsRequest {
string namespace = 1;
int32 page_size = 2;
bytes next_page_token = 3;
string query = 4;
}
// Deprecated: Use with `ListWorkflowExecutions`.
message ScanWorkflowExecutionsResponse {
repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;