@temporalio/core-bridge 1.6.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +520 -456
- package/lib/index.d.ts +8 -6
- package/lib/index.js.map +1 -1
- package/package.json +8 -3
- package/releases/aarch64-apple-darwin/index.node +0 -0
- package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
- package/releases/x86_64-apple-darwin/index.node +0 -0
- package/releases/x86_64-pc-windows-msvc/index.node +0 -0
- package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
- package/sdk-core/.buildkite/docker/Dockerfile +2 -2
- package/sdk-core/.buildkite/docker/docker-compose.yaml +1 -1
- package/sdk-core/.buildkite/pipeline.yml +1 -1
- package/sdk-core/.github/workflows/heavy.yml +1 -0
- package/sdk-core/README.md +13 -7
- package/sdk-core/client/src/lib.rs +27 -9
- package/sdk-core/client/src/metrics.rs +17 -8
- package/sdk-core/client/src/raw.rs +3 -3
- package/sdk-core/core/Cargo.toml +3 -4
- package/sdk-core/core/src/abstractions/take_cell.rs +28 -0
- package/sdk-core/core/src/abstractions.rs +197 -18
- package/sdk-core/core/src/core_tests/activity_tasks.rs +137 -45
- package/sdk-core/core/src/core_tests/child_workflows.rs +6 -5
- package/sdk-core/core/src/core_tests/determinism.rs +212 -2
- package/sdk-core/core/src/core_tests/local_activities.rs +183 -36
- package/sdk-core/core/src/core_tests/queries.rs +32 -14
- package/sdk-core/core/src/core_tests/workers.rs +8 -5
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +340 -51
- package/sdk-core/core/src/ephemeral_server/mod.rs +110 -8
- package/sdk-core/core/src/internal_flags.rs +141 -0
- package/sdk-core/core/src/lib.rs +14 -9
- package/sdk-core/core/src/replay/mod.rs +16 -27
- package/sdk-core/core/src/telemetry/metrics.rs +69 -35
- package/sdk-core/core/src/telemetry/mod.rs +38 -14
- package/sdk-core/core/src/telemetry/prometheus_server.rs +19 -13
- package/sdk-core/core/src/test_help/mod.rs +65 -13
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +119 -160
- package/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +89 -0
- package/sdk-core/core/src/worker/activities/local_activities.rs +122 -6
- package/sdk-core/core/src/worker/activities.rs +347 -173
- package/sdk-core/core/src/worker/client/mocks.rs +22 -2
- package/sdk-core/core/src/worker/client.rs +18 -2
- package/sdk-core/core/src/worker/mod.rs +137 -44
- package/sdk-core/core/src/worker/workflow/history_update.rs +132 -51
- package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +207 -166
- package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +6 -7
- package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +6 -7
- package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +157 -82
- package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +12 -12
- package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +6 -7
- package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +13 -15
- package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +170 -60
- package/sdk-core/core/src/worker/workflow/machines/mod.rs +24 -16
- package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +6 -8
- package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +320 -204
- package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +10 -13
- package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +15 -23
- package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +187 -46
- package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +237 -111
- package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +13 -13
- package/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +10 -6
- package/sdk-core/core/src/worker/workflow/managed_run.rs +81 -62
- package/sdk-core/core/src/worker/workflow/mod.rs +341 -79
- package/sdk-core/core/src/worker/workflow/run_cache.rs +18 -11
- package/sdk-core/core/src/worker/workflow/wft_extraction.rs +15 -3
- package/sdk-core/core/src/worker/workflow/workflow_stream/saved_wf_inputs.rs +2 -0
- package/sdk-core/core/src/worker/workflow/workflow_stream.rs +75 -52
- package/sdk-core/core-api/Cargo.toml +0 -1
- package/sdk-core/core-api/src/lib.rs +13 -7
- package/sdk-core/core-api/src/telemetry.rs +4 -6
- package/sdk-core/core-api/src/worker.rs +5 -0
- package/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +80 -55
- package/sdk-core/fsm/rustfsm_trait/src/lib.rs +22 -68
- package/sdk-core/histories/ends_empty_wft_complete.bin +0 -0
- package/sdk-core/histories/old_change_marker_format.bin +0 -0
- package/sdk-core/protos/api_upstream/.github/CODEOWNERS +2 -1
- package/sdk-core/protos/api_upstream/Makefile +1 -1
- package/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +5 -17
- package/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +11 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/command_type.proto +1 -6
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/event_type.proto +6 -6
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +5 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/update.proto +22 -6
- package/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +48 -19
- package/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +2 -0
- package/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +3 -0
- package/sdk-core/protos/api_upstream/temporal/api/{enums/v1/interaction_type.proto → protocol/v1/message.proto} +29 -11
- package/sdk-core/protos/api_upstream/temporal/api/sdk/v1/task_complete_metadata.proto +63 -0
- package/sdk-core/protos/api_upstream/temporal/api/update/v1/message.proto +111 -0
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +59 -28
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +2 -2
- package/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +7 -8
- package/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +10 -7
- package/sdk-core/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +19 -30
- package/sdk-core/protos/local/temporal/sdk/core/common/common.proto +1 -0
- package/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +1 -0
- package/sdk-core/protos/local/temporal/sdk/core/external_data/external_data.proto +8 -0
- package/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +65 -60
- package/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +85 -84
- package/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +9 -3
- package/sdk-core/sdk/Cargo.toml +1 -1
- package/sdk-core/sdk/src/lib.rs +21 -5
- package/sdk-core/sdk/src/workflow_context/options.rs +7 -1
- package/sdk-core/sdk/src/workflow_context.rs +24 -17
- package/sdk-core/sdk/src/workflow_future.rs +9 -3
- package/sdk-core/sdk-core-protos/src/history_builder.rs +114 -89
- package/sdk-core/sdk-core-protos/src/history_info.rs +6 -1
- package/sdk-core/sdk-core-protos/src/lib.rs +205 -64
- package/sdk-core/test-utils/src/canned_histories.rs +106 -296
- package/sdk-core/test-utils/src/lib.rs +32 -5
- package/sdk-core/tests/heavy_tests.rs +10 -43
- package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +25 -3
- package/sdk-core/tests/integ_tests/heartbeat_tests.rs +5 -3
- package/sdk-core/tests/integ_tests/metrics_tests.rs +218 -16
- package/sdk-core/tests/integ_tests/polling_tests.rs +3 -8
- package/sdk-core/tests/integ_tests/queries_tests.rs +4 -2
- package/sdk-core/tests/integ_tests/visibility_tests.rs +34 -23
- package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +97 -81
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -0
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +1 -0
- package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +80 -3
- package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +5 -1
- package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +1 -0
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +25 -3
- package/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +2 -4
- package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +30 -0
- package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +64 -0
- package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -0
- package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +4 -0
- package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +3 -1
- package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +7 -2
- package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +6 -7
- package/sdk-core/tests/integ_tests/workflow_tests.rs +8 -8
- package/sdk-core/tests/main.rs +16 -25
- package/sdk-core/tests/runner.rs +11 -9
- package/src/conversions.rs +14 -8
- package/src/runtime.rs +9 -8
- package/ts/index.ts +8 -6
- package/sdk-core/protos/api_upstream/temporal/api/interaction/v1/message.proto +0 -87
|
@@ -41,9 +41,10 @@ import "temporal/api/enums/v1/failed_cause.proto";
|
|
|
41
41
|
import "temporal/api/enums/v1/workflow.proto";
|
|
42
42
|
import "temporal/api/common/v1/message.proto";
|
|
43
43
|
import "temporal/api/failure/v1/message.proto";
|
|
44
|
-
import "temporal/api/interaction/v1/message.proto";
|
|
45
44
|
import "temporal/api/taskqueue/v1/message.proto";
|
|
45
|
+
import "temporal/api/update/v1/message.proto";
|
|
46
46
|
import "temporal/api/workflow/v1/message.proto";
|
|
47
|
+
import "temporal/api/sdk/v1/task_complete_metadata.proto";
|
|
47
48
|
|
|
48
49
|
// Always the first event in workflow history
|
|
49
50
|
message WorkflowExecutionStartedEventAttributes {
|
|
@@ -195,6 +196,11 @@ message WorkflowTaskCompletedEventAttributes {
|
|
|
195
196
|
// ID of the worker who picked up this workflow task, or missing if worker
|
|
196
197
|
// is not using versioning.
|
|
197
198
|
temporal.api.taskqueue.v1.VersionId worker_versioning_id = 5;
|
|
199
|
+
// Data the SDK wishes to record for itself, but server need not interpret, and does not
|
|
200
|
+
// directly impact workflow state.
|
|
201
|
+
temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 6;
|
|
202
|
+
// Local usage data sent during workflow task completion and recorded here for posterity
|
|
203
|
+
temporal.api.common.v1.MeteringMetadata metering_metadata = 13;
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
message WorkflowTaskTimedOutEventAttributes {
|
|
@@ -647,21 +653,6 @@ message ChildWorkflowExecutionTerminatedEventAttributes {
|
|
|
647
653
|
int64 started_event_id = 5;
|
|
648
654
|
}
|
|
649
655
|
|
|
650
|
-
message WorkflowUpdateAcceptedEventAttributes {
|
|
651
|
-
temporal.api.interaction.v1.Meta meta = 1;
|
|
652
|
-
temporal.api.interaction.v1.Input input = 2;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
message WorkflowUpdateCompletedEventAttributes {
|
|
656
|
-
temporal.api.interaction.v1.Meta meta = 1;
|
|
657
|
-
temporal.api.interaction.v1.Output output = 2;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
message WorkflowUpdateRejectedEventAttributes {
|
|
661
|
-
temporal.api.interaction.v1.Meta meta = 1;
|
|
662
|
-
temporal.api.failure.v1.Failure failure = 2;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
656
|
message WorkflowPropertiesModifiedExternallyEventAttributes {
|
|
666
657
|
// If set to a nonempty string, future workflow tasks for this workflow shall be dispatched on
|
|
667
658
|
// the provided queue.
|
|
@@ -686,6 +677,44 @@ message ActivityPropertiesModifiedExternallyEventAttributes {
|
|
|
686
677
|
temporal.api.common.v1.RetryPolicy new_retry_policy = 2;
|
|
687
678
|
}
|
|
688
679
|
|
|
680
|
+
message WorkflowExecutionUpdateAcceptedEventAttributes {
|
|
681
|
+
// The instance ID of the update protocol that generated this event.
|
|
682
|
+
string protocol_instance_id = 1;
|
|
683
|
+
// The message ID of the original request message that initiated this
|
|
684
|
+
// update. Needed so that the worker can recreate and deliver that same
|
|
685
|
+
// message as part of replay.
|
|
686
|
+
string accepted_request_message_id = 2;
|
|
687
|
+
// The event ID used to sequence the original request message.
|
|
688
|
+
int64 accepted_request_sequencing_event_id = 3;
|
|
689
|
+
// The message payload of the original request message that initiated this
|
|
690
|
+
// update.
|
|
691
|
+
temporal.api.update.v1.Request accepted_request = 4;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
message WorkflowExecutionUpdateCompletedEventAttributes {
|
|
695
|
+
// The metadata about this update.
|
|
696
|
+
temporal.api.update.v1.Meta meta = 1;
|
|
697
|
+
// The outcome of executing the workflow update function.
|
|
698
|
+
temporal.api.update.v1.Outcome outcome = 2;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
message WorkflowExecutionUpdateRejectedEventAttributes {
|
|
702
|
+
// The instance ID of the update protocol that generated this event.
|
|
703
|
+
string protocol_instance_id = 1;
|
|
704
|
+
// The message ID of the original request message that initiated this
|
|
705
|
+
// update. Needed so that the worker can recreate and deliver that same
|
|
706
|
+
// message as part of replay.
|
|
707
|
+
string rejected_request_message_id = 2;
|
|
708
|
+
// The event ID used to sequence the original request message.
|
|
709
|
+
int64 rejected_request_sequencing_event_id = 3;
|
|
710
|
+
// The message payload of the original request message that initiated this
|
|
711
|
+
// update.
|
|
712
|
+
temporal.api.update.v1.Request rejected_request = 4;
|
|
713
|
+
// The cause of rejection.
|
|
714
|
+
temporal.api.failure.v1.Failure failure = 5;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
|
|
689
718
|
// History events are the method by which Temporal SDKs advance (or recreate) workflow state.
|
|
690
719
|
// See the `EventType` enum for more info about what each event is for.
|
|
691
720
|
message HistoryEvent {
|
|
@@ -744,9 +773,9 @@ message HistoryEvent {
|
|
|
744
773
|
SignalExternalWorkflowExecutionFailedEventAttributes signal_external_workflow_execution_failed_event_attributes = 43;
|
|
745
774
|
ExternalWorkflowExecutionSignaledEventAttributes external_workflow_execution_signaled_event_attributes = 44;
|
|
746
775
|
UpsertWorkflowSearchAttributesEventAttributes upsert_workflow_search_attributes_event_attributes = 45;
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
776
|
+
WorkflowExecutionUpdateAcceptedEventAttributes workflow_execution_update_accepted_event_attributes = 46;
|
|
777
|
+
WorkflowExecutionUpdateRejectedEventAttributes workflow_execution_update_rejected_event_attributes = 47;
|
|
778
|
+
WorkflowExecutionUpdateCompletedEventAttributes workflow_execution_update_completed_event_attributes = 48;
|
|
750
779
|
WorkflowPropertiesModifiedExternallyEventAttributes workflow_properties_modified_externally_event_attributes = 49;
|
|
751
780
|
ActivityPropertiesModifiedExternallyEventAttributes activity_properties_modified_externally_event_attributes = 50;
|
|
752
781
|
WorkflowPropertiesModifiedEventAttributes workflow_properties_modified_event_attributes = 51;
|
|
@@ -62,6 +62,8 @@ message NamespaceConfig {
|
|
|
62
62
|
// If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.
|
|
63
63
|
temporal.api.enums.v1.ArchivalState visibility_archival_state = 5;
|
|
64
64
|
string visibility_archival_uri = 6;
|
|
65
|
+
// Map from field name to alias.
|
|
66
|
+
map<string, string> custom_search_attribute_aliases = 7;
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
message BadBinaries {
|
|
@@ -38,6 +38,7 @@ import "temporal/api/enums/v1/common.proto";
|
|
|
38
38
|
message AddSearchAttributesRequest {
|
|
39
39
|
// Mapping between search attribute name and its IndexedValueType.
|
|
40
40
|
map<string, temporal.api.enums.v1.IndexedValueType> search_attributes = 1;
|
|
41
|
+
string namespace = 2;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
message AddSearchAttributesResponse {
|
|
@@ -46,12 +47,14 @@ message AddSearchAttributesResponse {
|
|
|
46
47
|
message RemoveSearchAttributesRequest {
|
|
47
48
|
// Search attribute names to delete.
|
|
48
49
|
repeated string search_attributes = 1;
|
|
50
|
+
string namespace = 2;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
message RemoveSearchAttributesResponse {
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
message ListSearchAttributesRequest {
|
|
57
|
+
string namespace = 1;
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
message ListSearchAttributesResponse {
|
|
@@ -22,18 +22,36 @@
|
|
|
22
22
|
|
|
23
23
|
syntax = "proto3";
|
|
24
24
|
|
|
25
|
-
package temporal.api.
|
|
25
|
+
package temporal.api.protocol.v1;
|
|
26
26
|
|
|
27
|
-
option go_package = "go.temporal.io/api/
|
|
28
|
-
option java_package = "io.temporal.api.
|
|
27
|
+
option go_package = "go.temporal.io/api/protocol/v1;protocol";
|
|
28
|
+
option java_package = "io.temporal.api.protocol.v1";
|
|
29
29
|
option java_multiple_files = true;
|
|
30
|
-
option java_outer_classname = "
|
|
31
|
-
option ruby_package = "Temporalio::Api::
|
|
32
|
-
option csharp_namespace = "
|
|
30
|
+
option java_outer_classname = "MessageProto";
|
|
31
|
+
option ruby_package = "Temporalio::Api::Protocol::V1";
|
|
32
|
+
option csharp_namespace = "Temporalt.Api.Protocol.V1";
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
import "google/protobuf/any.proto";
|
|
35
|
+
|
|
36
|
+
// (-- api-linter: core::0146::any=disabled
|
|
37
|
+
// aip.dev/not-precedent: We want runtime extensibility for the body field --)
|
|
38
|
+
message Message {
|
|
39
|
+
// An ID for this specific message.
|
|
40
|
+
string id = 1;
|
|
41
|
+
|
|
42
|
+
// Identifies the specific instance of a protocol to which this message
|
|
43
|
+
// belongs.
|
|
44
|
+
string protocol_instance_id = 2;
|
|
45
|
+
|
|
46
|
+
// The event ID or command ID after which this message can be delivered. The
|
|
47
|
+
// effects of history up to and including this event ID should be visible to
|
|
48
|
+
// the code that handles this message. Omit to opt out of sequencing.
|
|
49
|
+
oneof sequencing_id {
|
|
50
|
+
int64 event_id = 3;
|
|
51
|
+
int64 command_index = 4;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// The opaque data carried by this message. The protocol type can be
|
|
55
|
+
// extracted from the package name of the message carried inside the Any.
|
|
56
|
+
google.protobuf.Any body = 5;
|
|
39
57
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// The MIT License
|
|
2
|
+
//
|
|
3
|
+
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
// furnished to do so, subject to the following conditions:
|
|
11
|
+
//
|
|
12
|
+
// The above copyright notice and this permission notice shall be included in
|
|
13
|
+
// all copies or substantial portions of the Software.
|
|
14
|
+
//
|
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
// THE SOFTWARE.
|
|
22
|
+
|
|
23
|
+
syntax = "proto3";
|
|
24
|
+
|
|
25
|
+
package temporal.api.sdk.v1;
|
|
26
|
+
|
|
27
|
+
option go_package = "go.temporal.io/api/sdk/v1;sdk";
|
|
28
|
+
option java_package = "io.temporal.api.sdk.v1";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "TaskCompleteMetadataProto";
|
|
31
|
+
option ruby_package = "Temporalio::Api::Sdk::V1";
|
|
32
|
+
option csharp_namespace = "Temporalio.Api.Sdk.V1";
|
|
33
|
+
|
|
34
|
+
message WorkflowTaskCompletedMetadata {
|
|
35
|
+
// Internal flags used by the core SDK. SDKs using flags must comply with the following behavior:
|
|
36
|
+
//
|
|
37
|
+
// During replay:
|
|
38
|
+
// * If a flag is not recognized (value is too high or not defined), it must fail the workflow
|
|
39
|
+
// task.
|
|
40
|
+
// * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for
|
|
41
|
+
// that flag during and after this WFT are allowed to assume that the flag is present.
|
|
42
|
+
// * If a code check for a flag does not find the flag in the set of used flags, it must take
|
|
43
|
+
// the branch corresponding to the absence of that flag.
|
|
44
|
+
//
|
|
45
|
+
// During non-replay execution of new WFTs:
|
|
46
|
+
// * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not
|
|
47
|
+
// previously recorded) flags when completing the WFT.
|
|
48
|
+
//
|
|
49
|
+
// SDKs which are too old to even know about this field at all are considered to produce
|
|
50
|
+
// undefined behavior if they replay workflows which used this mechanism.
|
|
51
|
+
//
|
|
52
|
+
// (-- api-linter: core::0141::forbidden-types=disabled
|
|
53
|
+
// aip.dev/not-precedent: These really shouldn't have negative values. --)
|
|
54
|
+
repeated uint32 core_used_flags = 1;
|
|
55
|
+
|
|
56
|
+
// Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages
|
|
57
|
+
// here as processing a workflow with a different language than the one which authored it is
|
|
58
|
+
// already undefined behavior. See `core_used_patches` for more.
|
|
59
|
+
//
|
|
60
|
+
// (-- api-linter: core::0141::forbidden-types=disabled
|
|
61
|
+
// aip.dev/not-precedent: These really shouldn't have negative values. --)
|
|
62
|
+
repeated uint32 lang_used_flags = 2;
|
|
63
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// The MIT License
|
|
2
|
+
//
|
|
3
|
+
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
// furnished to do so, subject to the following conditions:
|
|
11
|
+
//
|
|
12
|
+
// The above copyright notice and this permission notice shall be included in
|
|
13
|
+
// all copies or substantial portions of the Software.
|
|
14
|
+
//
|
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
// THE SOFTWARE.
|
|
22
|
+
|
|
23
|
+
syntax = "proto3";
|
|
24
|
+
|
|
25
|
+
package temporal.api.update.v1;
|
|
26
|
+
|
|
27
|
+
option go_package = "go.temporal.io/api/update/v1;update";
|
|
28
|
+
option java_package = "io.temporal.api.update.v1";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "MessageProto";
|
|
31
|
+
option ruby_package = "Temporalio::Api::Update::V1";
|
|
32
|
+
option csharp_namespace = "Temporalio.Api.Update.V1";
|
|
33
|
+
|
|
34
|
+
import "temporal/api/common/v1/message.proto";
|
|
35
|
+
import "temporal/api/enums/v1/update.proto";
|
|
36
|
+
import "temporal/api/failure/v1/message.proto";
|
|
37
|
+
|
|
38
|
+
// Sepcifies to the gRPC server how the client wants the UpdateWorkflowExecution
|
|
39
|
+
// call to wait before returning control to the caller.
|
|
40
|
+
message WaitPolicy {
|
|
41
|
+
|
|
42
|
+
// Indicates the update lifecycle stage that the gRPC call should wait for
|
|
43
|
+
// before returning.
|
|
44
|
+
temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage lifecycle_stage = 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// The data needed by a client to refer to an previously invoked workflow
|
|
48
|
+
// execution update process.
|
|
49
|
+
message UpdateRef {
|
|
50
|
+
temporal.api.common.v1.WorkflowExecution workflow_execution = 1;
|
|
51
|
+
string update_id = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// The outcome of a workflow update - success or failure.
|
|
55
|
+
message Outcome {
|
|
56
|
+
oneof value {
|
|
57
|
+
temporal.api.common.v1.Payloads success = 1;
|
|
58
|
+
temporal.api.failure.v1.Failure failure = 2;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Metadata about a workflow execution update.
|
|
63
|
+
message Meta {
|
|
64
|
+
// An ID with workflow-scoped uniqueness for this update
|
|
65
|
+
string update_id = 1;
|
|
66
|
+
|
|
67
|
+
// A string identifying the agent that requested this update.
|
|
68
|
+
string identity = 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message Input {
|
|
72
|
+
// Headers that are passed with the update from the requesting entity.
|
|
73
|
+
// These can include things like auth or tracing tokens.
|
|
74
|
+
temporal.api.common.v1.Header header = 1;
|
|
75
|
+
|
|
76
|
+
// The name of the input handler to invoke on the target workflow
|
|
77
|
+
string name = 2;
|
|
78
|
+
|
|
79
|
+
// The arguments to pass to the named handler.
|
|
80
|
+
temporal.api.common.v1.Payloads args = 3;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// The client request that triggers a workflow execution update
|
|
84
|
+
message Request {
|
|
85
|
+
Meta meta = 1;
|
|
86
|
+
Input input = 2;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// An update protocol message indicating that a workflow execution update has
|
|
90
|
+
// been rejected.
|
|
91
|
+
message Rejection {
|
|
92
|
+
string rejected_request_message_id = 1;
|
|
93
|
+
int64 rejected_request_sequencing_event_id = 2;
|
|
94
|
+
Request rejected_request = 3;
|
|
95
|
+
temporal.api.failure.v1.Failure failure = 4;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// An update protocol message indicating that a workflow execution update has
|
|
99
|
+
// been accepted (i.e. passed the worker-side validation phase).
|
|
100
|
+
message Acceptance {
|
|
101
|
+
string accepted_request_message_id = 1;
|
|
102
|
+
int64 accepted_request_sequencing_event_id = 2;
|
|
103
|
+
Request accepted_request = 3;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// An update protocol message indicating that a workflow execution update has
|
|
107
|
+
// completed with the contained outcome.
|
|
108
|
+
message Response {
|
|
109
|
+
Meta meta = 1;
|
|
110
|
+
Outcome outcome = 2;
|
|
111
|
+
}
|
|
@@ -39,21 +39,22 @@ import "temporal/api/enums/v1/common.proto";
|
|
|
39
39
|
import "temporal/api/enums/v1/query.proto";
|
|
40
40
|
import "temporal/api/enums/v1/reset.proto";
|
|
41
41
|
import "temporal/api/enums/v1/task_queue.proto";
|
|
42
|
-
import "temporal/api/enums/v1/update.proto";
|
|
43
42
|
import "temporal/api/common/v1/message.proto";
|
|
44
43
|
import "temporal/api/history/v1/message.proto";
|
|
45
|
-
import "temporal/api/interaction/v1/message.proto";
|
|
46
44
|
import "temporal/api/workflow/v1/message.proto";
|
|
47
45
|
import "temporal/api/command/v1/message.proto";
|
|
48
46
|
import "temporal/api/failure/v1/message.proto";
|
|
49
47
|
import "temporal/api/filter/v1/message.proto";
|
|
48
|
+
import "temporal/api/protocol/v1/message.proto";
|
|
50
49
|
import "temporal/api/namespace/v1/message.proto";
|
|
51
50
|
import "temporal/api/query/v1/message.proto";
|
|
52
51
|
import "temporal/api/replication/v1/message.proto";
|
|
53
52
|
import "temporal/api/schedule/v1/message.proto";
|
|
54
53
|
import "temporal/api/taskqueue/v1/message.proto";
|
|
54
|
+
import "temporal/api/update/v1/message.proto";
|
|
55
55
|
import "temporal/api/version/v1/message.proto";
|
|
56
56
|
import "temporal/api/batch/v1/message.proto";
|
|
57
|
+
import "temporal/api/sdk/v1/task_complete_metadata.proto";
|
|
57
58
|
|
|
58
59
|
import "google/protobuf/duration.proto";
|
|
59
60
|
import "google/protobuf/timestamp.proto";
|
|
@@ -168,10 +169,25 @@ message StartWorkflowExecutionRequest {
|
|
|
168
169
|
temporal.api.common.v1.Memo memo = 14;
|
|
169
170
|
temporal.api.common.v1.SearchAttributes search_attributes = 15;
|
|
170
171
|
temporal.api.common.v1.Header header = 16;
|
|
172
|
+
// Request to get the first workflow task inline in the response bypassing matching service and worker polling.
|
|
173
|
+
// If set to `true` the caller is expected to have a worker available and capable of processing the task.
|
|
174
|
+
// The returned task will be marked as started and is expected to be completed by the specified
|
|
175
|
+
// `workflow_task_timeout`.
|
|
176
|
+
bool request_eager_execution = 17;
|
|
177
|
+
// These values will be available as ContinuedFailure and LastCompletionResult in the
|
|
178
|
+
// WorkflowExecutionStarted event and through SDKs. The are currently only used by the
|
|
179
|
+
// server itself (for the schedules feature) and are not intended to be exposed in
|
|
180
|
+
// StartWorkflowExecution.
|
|
181
|
+
temporal.api.failure.v1.Failure continued_failure = 18;
|
|
182
|
+
temporal.api.common.v1.Payloads last_completion_result = 19;
|
|
171
183
|
}
|
|
172
184
|
|
|
173
185
|
message StartWorkflowExecutionResponse {
|
|
174
186
|
string run_id = 1;
|
|
187
|
+
// When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will
|
|
188
|
+
// return the first workflow task to be eagerly executed.
|
|
189
|
+
// The caller is expected to have a worker available to process the task.
|
|
190
|
+
PollWorkflowTaskQueueResponse eager_workflow_task = 2;
|
|
175
191
|
}
|
|
176
192
|
|
|
177
193
|
message GetWorkflowExecutionHistoryRequest {
|
|
@@ -267,8 +283,8 @@ message PollWorkflowTaskQueueResponse {
|
|
|
267
283
|
// Queries that should be executed after applying the history in this task. Responses should be
|
|
268
284
|
// attached to `RespondWorkflowTaskCompletedRequest::query_results`
|
|
269
285
|
map<string, temporal.api.query.v1.WorkflowQuery> queries = 14;
|
|
270
|
-
|
|
271
|
-
repeated temporal.api.
|
|
286
|
+
// Protocol messages piggybacking on a WFT as a transport
|
|
287
|
+
repeated temporal.api.protocol.v1.Message messages = 15;
|
|
272
288
|
}
|
|
273
289
|
|
|
274
290
|
message RespondWorkflowTaskCompletedRequest {
|
|
@@ -299,6 +315,13 @@ message RespondWorkflowTaskCompletedRequest {
|
|
|
299
315
|
// When `worker_versioning_id` has a `worker_build_id`, and `binary_checksum` is not
|
|
300
316
|
// set, that value should also be considered as the `binary_checksum`.
|
|
301
317
|
temporal.api.taskqueue.v1.VersionId worker_versioning_id = 10;
|
|
318
|
+
// Protocol messages piggybacking on a WFT as a transport
|
|
319
|
+
repeated temporal.api.protocol.v1.Message messages = 11;
|
|
320
|
+
// Data the SDK wishes to record for itself, but server need not interpret, and does not
|
|
321
|
+
// directly impact workflow state.
|
|
322
|
+
temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 12;
|
|
323
|
+
// Local usage data collected for metering
|
|
324
|
+
temporal.api.common.v1.MeteringMetadata metering_metadata = 13;
|
|
302
325
|
}
|
|
303
326
|
|
|
304
327
|
message RespondWorkflowTaskCompletedResponse {
|
|
@@ -323,6 +346,8 @@ message RespondWorkflowTaskFailedRequest {
|
|
|
323
346
|
// Worker process' unique binary id
|
|
324
347
|
string binary_checksum = 5;
|
|
325
348
|
string namespace = 6;
|
|
349
|
+
// Protocol messages piggybacking on a WFT as a transport
|
|
350
|
+
repeated temporal.api.protocol.v1.Message messages = 7;
|
|
326
351
|
}
|
|
327
352
|
|
|
328
353
|
message RespondWorkflowTaskFailedResponse {
|
|
@@ -851,6 +876,13 @@ message GetSystemInfoResponse {
|
|
|
851
876
|
|
|
852
877
|
// True if server supports upserting workflow memo
|
|
853
878
|
bool upsert_memo = 7;
|
|
879
|
+
|
|
880
|
+
// True if server supports eager workflow task dispatching for the StartWorkflowExecution API
|
|
881
|
+
bool eager_workflow_start = 8;
|
|
882
|
+
|
|
883
|
+
// True if the server knows about the sdk metadata field on WFT completions and will record
|
|
884
|
+
// it in history
|
|
885
|
+
bool sdk_metadata = 9;
|
|
854
886
|
}
|
|
855
887
|
}
|
|
856
888
|
|
|
@@ -1051,51 +1083,50 @@ message GetWorkerBuildIdOrderingResponse {
|
|
|
1051
1083
|
|
|
1052
1084
|
// (-- api-linter: core::0134=disabled
|
|
1053
1085
|
// aip.dev/not-precedent: Update RPCs don't follow Google API format. --)
|
|
1054
|
-
message
|
|
1055
|
-
// A unique ID for this logical request
|
|
1056
|
-
string request_id = 1;
|
|
1057
|
-
|
|
1058
|
-
// The manner in which the update result will be accessed.
|
|
1059
|
-
// This field requires a non-default value; the default value of the enum
|
|
1060
|
-
// will result in an error.
|
|
1061
|
-
temporal.api.enums.v1.WorkflowUpdateResultAccessStyle result_access_style = 2;
|
|
1062
|
-
|
|
1086
|
+
message UpdateWorkflowExecutionRequest {
|
|
1063
1087
|
// The namespace name of the target workflow
|
|
1064
|
-
string namespace =
|
|
1088
|
+
string namespace = 1;
|
|
1065
1089
|
// The target workflow id and (optionally) a specific run thereof
|
|
1066
1090
|
// (-- api-linter: core::0203::optional=disabled
|
|
1067
1091
|
// aip.dev/not-precedent: false positive triggered by the word "optional" --)
|
|
1068
|
-
temporal.api.common.v1.WorkflowExecution workflow_execution =
|
|
1092
|
+
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
|
|
1069
1093
|
// If set, this call will error if the most recent (if no run id is set on
|
|
1070
1094
|
// `workflow_execution`), or specified (if it is) workflow execution is not
|
|
1071
1095
|
// part of the same execution chain as this id.
|
|
1072
|
-
string first_execution_run_id =
|
|
1096
|
+
string first_execution_run_id = 3;
|
|
1073
1097
|
|
|
1074
|
-
//
|
|
1075
|
-
|
|
1098
|
+
// Describes when this request should return - basically whether the
|
|
1099
|
+
// update is synchronous, asynchronous, or somewhere in between.
|
|
1100
|
+
temporal.api.update.v1.WaitPolicy wait_policy = 4;
|
|
1076
1101
|
|
|
1077
|
-
// The
|
|
1078
|
-
//
|
|
1079
|
-
temporal.api.
|
|
1102
|
+
// The request information that will be delivered all the way down to the
|
|
1103
|
+
// workflow execution.
|
|
1104
|
+
temporal.api.update.v1.Request request = 5;
|
|
1080
1105
|
}
|
|
1081
1106
|
|
|
1082
|
-
message
|
|
1083
|
-
//
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
// The
|
|
1087
|
-
|
|
1107
|
+
message UpdateWorkflowExecutionResponse {
|
|
1108
|
+
// Enough information for subsequent poll calls if needed. Never null.
|
|
1109
|
+
temporal.api.update.v1.UpdateRef update_ref = 1;
|
|
1110
|
+
|
|
1111
|
+
// The outcome of the update if and only if the workflow execution update
|
|
1112
|
+
// has completed. If this response is being returned before the update has
|
|
1113
|
+
// completed then this field will not be set.
|
|
1114
|
+
temporal.api.update.v1.Outcome outcome = 2;
|
|
1088
1115
|
}
|
|
1089
1116
|
|
|
1090
1117
|
message StartBatchOperationRequest {
|
|
1091
1118
|
// Namespace that contains the batch operation
|
|
1092
1119
|
string namespace = 1;
|
|
1093
|
-
// Visibility query defines the the group of workflow to
|
|
1120
|
+
// Visibility query defines the the group of workflow to apply the batch operation
|
|
1121
|
+
// This field and Executions are mutually exclusive
|
|
1094
1122
|
string visibility_query = 2;
|
|
1095
1123
|
// Job ID defines the unique ID for the batch job
|
|
1096
1124
|
string job_id = 3;
|
|
1097
1125
|
// Reason to perform the batch operation
|
|
1098
1126
|
string reason = 4;
|
|
1127
|
+
// Executions to apply the batch operation
|
|
1128
|
+
// This field and VisibilityQuery are mutually exclusive
|
|
1129
|
+
repeated temporal.api.common.v1.WorkflowExecution executions = 5;
|
|
1099
1130
|
// Operation input
|
|
1100
1131
|
oneof operation {
|
|
1101
1132
|
temporal.api.batch.v1.BatchOperationTermination termination_operation = 10;
|
|
@@ -393,8 +393,8 @@ service WorkflowService {
|
|
|
393
393
|
|
|
394
394
|
// Invokes the specified update function on user workflow code.
|
|
395
395
|
// (-- api-linter: core::0134=disabled
|
|
396
|
-
// aip.dev/not-precedent:
|
|
397
|
-
rpc
|
|
396
|
+
// aip.dev/not-precedent: UpdateWorkflowExecution doesn't follow Google API format --)
|
|
397
|
+
rpc UpdateWorkflowExecution(UpdateWorkflowExecutionRequest) returns (UpdateWorkflowExecutionResponse) {
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
// StartBatchOperation starts a new batch operation
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package coresdk.activity_result;
|
|
4
|
+
option ruby_package = "Temporalio::Bridge::Api::ActivityResult";
|
|
4
5
|
|
|
5
6
|
import "google/protobuf/duration.proto";
|
|
6
7
|
import "google/protobuf/timestamp.proto";
|
|
7
8
|
import "temporal/api/common/v1/message.proto";
|
|
8
9
|
import "temporal/api/failure/v1/message.proto";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
* Used to report activity completions to core
|
|
12
|
-
*/
|
|
11
|
+
// Used to report activity completions to core
|
|
13
12
|
message ActivityExecutionResult {
|
|
14
13
|
oneof status {
|
|
15
14
|
Success completed = 1;
|
|
@@ -30,17 +29,17 @@ message ActivityResolution {
|
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
// Used to report successful completion either when executing or resolving
|
|
34
33
|
message Success {
|
|
35
34
|
temporal.api.common.v1.Payload result = 1;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
// Used to report activity failure either when executing or resolving
|
|
39
38
|
message Failure {
|
|
40
39
|
temporal.api.failure.v1.Failure failure = 1;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
/*
|
|
44
43
|
* Used to report cancellation from both Core and Lang.
|
|
45
44
|
* When Lang reports a cancelled activity, it must put a CancelledFailure in the failure field.
|
|
46
45
|
* When Core reports a cancelled activity, it must put an ActivityFailure with CancelledFailure
|
|
@@ -50,14 +49,14 @@ message Cancellation {
|
|
|
50
49
|
temporal.api.failure.v1.Failure failure = 1;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
/*
|
|
54
53
|
* Used in ActivityExecutionResult to notify Core that this Activity will complete asynchronously.
|
|
55
54
|
* Core will forget about this Activity and free up resources used to track this Activity.
|
|
56
55
|
*/
|
|
57
56
|
message WillCompleteAsync {
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
/*
|
|
61
60
|
* Issued when a local activity needs to retry but also wants to back off more than would be
|
|
62
61
|
* reasonable to WFT heartbeat for. Lang is expected to schedule a timer for the duration
|
|
63
62
|
* and then start a local activity of the same type & same inputs with the provided attempt number
|
|
@@ -4,6 +4,7 @@ syntax = "proto3";
|
|
|
4
4
|
* Definitions of the different activity tasks returned from [crate::Core::poll_task].
|
|
5
5
|
*/
|
|
6
6
|
package coresdk.activity_task;
|
|
7
|
+
option ruby_package = "Temporalio::Bridge::Api::ActivityTask";
|
|
7
8
|
|
|
8
9
|
import "google/protobuf/duration.proto";
|
|
9
10
|
import "google/protobuf/timestamp.proto";
|
|
@@ -11,12 +12,12 @@ import "temporal/api/common/v1/message.proto";
|
|
|
11
12
|
import "temporal/sdk/core/common/common.proto";
|
|
12
13
|
|
|
13
14
|
message ActivityTask {
|
|
14
|
-
|
|
15
|
+
// A unique identifier for this task
|
|
15
16
|
bytes task_token = 1;
|
|
16
17
|
oneof variant {
|
|
17
|
-
|
|
18
|
+
// Start activity execution.
|
|
18
19
|
Start start = 3;
|
|
19
|
-
|
|
20
|
+
// Attempt to cancel activity execution.
|
|
20
21
|
Cancel cancel = 4;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -62,18 +63,20 @@ message Start {
|
|
|
62
63
|
bool is_local = 17;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
// Attempt to cancel a running activity
|
|
66
67
|
message Cancel {
|
|
67
68
|
ActivityCancelReason reason = 1;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
enum ActivityCancelReason {
|
|
71
|
-
|
|
72
|
+
// The activity no longer exists according to server (may be already completed)
|
|
72
73
|
NOT_FOUND = 0;
|
|
73
|
-
|
|
74
|
+
// Activity was explicitly cancelled
|
|
74
75
|
CANCELLED = 1;
|
|
75
|
-
|
|
76
|
+
// Activity timed out
|
|
76
77
|
TIMED_OUT = 2;
|
|
78
|
+
// Core is shutting down and the graceful timeout has elapsed
|
|
79
|
+
WORKER_SHUTDOWN = 3;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
|