@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
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package coresdk.child_workflow;
|
|
4
|
+
option ruby_package = "Temporalio::Bridge::Api::ChildWorkflow";
|
|
4
5
|
|
|
5
6
|
import "temporal/api/common/v1/message.proto";
|
|
6
7
|
import "temporal/api/failure/v1/message.proto";
|
|
7
8
|
import "temporal/sdk/core/common/common.proto";
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
* Used by core to resolve child workflow executions.
|
|
11
|
-
*/
|
|
10
|
+
// Used by core to resolve child workflow executions.
|
|
12
11
|
message ChildWorkflowResult {
|
|
13
12
|
oneof status {
|
|
14
13
|
Success completed = 1;
|
|
@@ -17,61 +16,51 @@ message ChildWorkflowResult {
|
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
* Used in ChildWorkflowResult to report successful completion.
|
|
22
|
-
*/
|
|
19
|
+
// Used in ChildWorkflowResult to report successful completion.
|
|
23
20
|
message Success {
|
|
24
21
|
temporal.api.common.v1.Payload result = 1;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* application failures, timeouts, terminations, and cancellations.
|
|
30
|
-
*/
|
|
24
|
+
// Used in ChildWorkflowResult to report non successful outcomes such as
|
|
25
|
+
// application failures, timeouts, terminations, and cancellations.
|
|
31
26
|
message Failure {
|
|
32
27
|
temporal.api.failure.v1.Failure failure = 1;
|
|
33
28
|
}
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* Failure should be ChildWorkflowFailure with a CanceledFailure cause.
|
|
38
|
-
*/
|
|
30
|
+
// Used in ChildWorkflowResult to report cancellation.
|
|
31
|
+
// Failure should be ChildWorkflowFailure with a CanceledFailure cause.
|
|
39
32
|
message Cancellation {
|
|
40
33
|
temporal.api.failure.v1.Failure failure = 1;
|
|
41
34
|
}
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* in case its parent is closed.
|
|
46
|
-
*/
|
|
36
|
+
// Used by the service to determine the fate of a child workflow
|
|
37
|
+
// in case its parent is closed.
|
|
47
38
|
enum ParentClosePolicy {
|
|
48
|
-
|
|
39
|
+
// Let's the server set the default.
|
|
49
40
|
PARENT_CLOSE_POLICY_UNSPECIFIED = 0;
|
|
50
|
-
|
|
41
|
+
// Terminate means terminating the child workflow.
|
|
51
42
|
PARENT_CLOSE_POLICY_TERMINATE = 1;
|
|
52
|
-
|
|
43
|
+
// Abandon means not doing anything on the child workflow.
|
|
53
44
|
PARENT_CLOSE_POLICY_ABANDON = 2;
|
|
54
|
-
|
|
45
|
+
// Cancel means requesting cancellation on the child workflow.
|
|
55
46
|
PARENT_CLOSE_POLICY_REQUEST_CANCEL = 3;
|
|
56
47
|
}
|
|
57
48
|
|
|
58
|
-
|
|
49
|
+
// Possible causes of failure to start a child workflow
|
|
59
50
|
enum StartChildWorkflowExecutionFailedCause {
|
|
60
51
|
START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0;
|
|
61
52
|
START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS = 1;
|
|
62
53
|
}
|
|
63
54
|
|
|
64
|
-
|
|
65
|
-
* Controls at which point to report back to lang when a child workflow is cancelled
|
|
66
|
-
*/
|
|
55
|
+
// Controls at which point to report back to lang when a child workflow is cancelled
|
|
67
56
|
enum ChildWorkflowCancellationType {
|
|
68
|
-
|
|
57
|
+
// Do not request cancellation of the child workflow if already scheduled
|
|
69
58
|
ABANDON = 0;
|
|
70
|
-
|
|
59
|
+
// Initiate a cancellation request and immediately report cancellation to the parent.
|
|
71
60
|
TRY_CANCEL = 1;
|
|
72
|
-
|
|
61
|
+
// Wait for child cancellation completion.
|
|
73
62
|
WAIT_CANCELLATION_COMPLETED = 2;
|
|
74
|
-
|
|
63
|
+
// Request cancellation of the child and wait for confirmation that the request was received.
|
|
75
64
|
WAIT_CANCELLATION_REQUESTED = 3;
|
|
76
65
|
}
|
|
77
66
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package coresdk;
|
|
4
|
+
option ruby_package = "Temporalio::Bridge::Api::CoreInterface";
|
|
4
5
|
|
|
5
6
|
// Note: Intellij will think the Google imports don't work because of the slightly odd nature of
|
|
6
7
|
// the include paths. You can make it work by going to the "Protobuf Support" settings section
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package coresdk.external_data;
|
|
4
|
+
option ruby_package = "Temporalio::Bridge::Api::ExternalData";
|
|
4
5
|
|
|
5
6
|
import "google/protobuf/duration.proto";
|
|
6
7
|
import "google/protobuf/timestamp.proto";
|
|
@@ -27,4 +28,11 @@ message LocalActivityMarkerData {
|
|
|
27
28
|
// The time the LA was originally scheduled (wall clock time). This is used to track
|
|
28
29
|
// schedule-to-close timeouts when timer-based backoffs are used
|
|
29
30
|
google.protobuf.Timestamp original_schedule_time = 7;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message PatchedMarkerData {
|
|
34
|
+
// The patch id
|
|
35
|
+
string id = 1;
|
|
36
|
+
// Whether or not the patch is marked deprecated.
|
|
37
|
+
bool deprecated = 2;
|
|
30
38
|
}
|
package/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto
CHANGED
|
@@ -5,6 +5,7 @@ syntax = "proto3";
|
|
|
5
5
|
* lang SDK applies these activation jobs to drive workflows.
|
|
6
6
|
*/
|
|
7
7
|
package coresdk.workflow_activation;
|
|
8
|
+
option ruby_package = "Temporalio::Bridge::Api::WorkflowActivation";
|
|
8
9
|
|
|
9
10
|
import "google/protobuf/timestamp.proto";
|
|
10
11
|
import "google/protobuf/duration.proto";
|
|
@@ -15,56 +16,60 @@ import "temporal/sdk/core/activity_result/activity_result.proto";
|
|
|
15
16
|
import "temporal/sdk/core/child_workflow/child_workflow.proto";
|
|
16
17
|
import "temporal/sdk/core/common/common.proto";
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
// An instruction to the lang sdk to run some workflow code, whether for the first time or from
|
|
20
|
+
// a cached state.
|
|
20
21
|
message WorkflowActivation {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
// The id of the currently active run of the workflow. Also used as a cache key. There may
|
|
23
|
+
// only ever be one active workflow task (and hence activation) of a run at one time.
|
|
23
24
|
string run_id = 1;
|
|
24
|
-
|
|
25
|
+
// The current time as understood by the workflow, which is set by workflow task started events
|
|
25
26
|
google.protobuf.Timestamp timestamp = 2;
|
|
26
|
-
|
|
27
|
+
// Whether or not the activation is replaying past events
|
|
27
28
|
bool is_replaying = 3;
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
// Current history length as determined by the event id of the most recently processed event.
|
|
30
|
+
// This ensures that the number is always deterministic
|
|
30
31
|
uint32 history_length = 4;
|
|
31
|
-
|
|
32
|
+
// The things to do upon activating the workflow
|
|
32
33
|
repeated WorkflowActivationJob jobs = 5;
|
|
34
|
+
// Internal flags which are available for use by lang. If `is_replaying` is false, all
|
|
35
|
+
// internal flags may be used. This is not a delta - all previously used flags always
|
|
36
|
+
// appear since this representation is cheap.
|
|
37
|
+
repeated uint32 available_internal_flags = 6;
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
message WorkflowActivationJob {
|
|
36
41
|
oneof variant {
|
|
37
|
-
|
|
42
|
+
// Begin a workflow for the first time
|
|
38
43
|
StartWorkflow start_workflow = 1;
|
|
39
|
-
|
|
44
|
+
// A timer has fired, allowing whatever was waiting on it (if anything) to proceed
|
|
40
45
|
FireTimer fire_timer = 2;
|
|
41
|
-
|
|
46
|
+
// Workflow was reset. The randomness seed must be updated.
|
|
42
47
|
UpdateRandomSeed update_random_seed = 4;
|
|
43
|
-
|
|
48
|
+
// A request to query the workflow was received.
|
|
44
49
|
QueryWorkflow query_workflow = 5;
|
|
45
|
-
|
|
50
|
+
// A request to cancel the workflow was received.
|
|
46
51
|
CancelWorkflow cancel_workflow = 6;
|
|
47
|
-
|
|
52
|
+
// A request to signal the workflow was received.
|
|
48
53
|
SignalWorkflow signal_workflow = 7;
|
|
49
|
-
|
|
54
|
+
// An activity was resolved, result could be completed, failed or cancelled
|
|
50
55
|
ResolveActivity resolve_activity = 8;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
// A patch marker has been detected and lang is being told that change exists. This
|
|
57
|
+
// job is strange in that it is sent pre-emptively to lang without any corresponding
|
|
58
|
+
// command being sent first.
|
|
54
59
|
NotifyHasPatch notify_has_patch = 9;
|
|
55
|
-
|
|
60
|
+
// A child workflow execution has started or failed to start
|
|
56
61
|
ResolveChildWorkflowExecutionStart resolve_child_workflow_execution_start = 10;
|
|
57
|
-
|
|
62
|
+
// A child workflow was resolved, result could be completed or failed
|
|
58
63
|
ResolveChildWorkflowExecution resolve_child_workflow_execution = 11;
|
|
59
|
-
|
|
64
|
+
// An attempt to signal an external workflow resolved
|
|
60
65
|
ResolveSignalExternalWorkflow resolve_signal_external_workflow = 12;
|
|
61
|
-
|
|
66
|
+
// An attempt to cancel an external workflow resolved
|
|
62
67
|
ResolveRequestCancelExternalWorkflow resolve_request_cancel_external_workflow = 13;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
// Remove the workflow identified by the [WorkflowActivation] containing this job from the cache
|
|
69
|
+
// after performing the activation.
|
|
70
|
+
//
|
|
71
|
+
// If other job variant are present in the list, this variant will be the last job in the
|
|
72
|
+
// job list. The string value is a reason for eviction.
|
|
68
73
|
RemoveFromCache remove_from_cache = 50;
|
|
69
74
|
}
|
|
70
75
|
}
|
|
@@ -123,23 +128,23 @@ message StartWorkflow {
|
|
|
123
128
|
google.protobuf.Timestamp start_time = 23;
|
|
124
129
|
}
|
|
125
130
|
|
|
126
|
-
|
|
131
|
+
// Notify a workflow that a timer has fired
|
|
127
132
|
message FireTimer {
|
|
128
|
-
|
|
133
|
+
// Sequence number as provided by lang in the corresponding StartTimer command
|
|
129
134
|
uint32 seq = 1;
|
|
130
135
|
}
|
|
131
136
|
|
|
132
|
-
|
|
137
|
+
// Notify a workflow that an activity has been resolved
|
|
133
138
|
message ResolveActivity {
|
|
134
|
-
|
|
139
|
+
// Sequence number as provided by lang in the corresponding ScheduleActivity command
|
|
135
140
|
uint32 seq = 1;
|
|
136
141
|
activity_result.ActivityResolution result = 2;
|
|
137
142
|
}
|
|
138
143
|
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
// Notify a workflow that a start child workflow execution request has succeeded, failed or was
|
|
145
|
+
// cancelled.
|
|
141
146
|
message ResolveChildWorkflowExecutionStart {
|
|
142
|
-
|
|
147
|
+
// Sequence number as provided by lang in the corresponding StartChildWorkflowExecution command
|
|
143
148
|
uint32 seq = 1;
|
|
144
149
|
oneof status {
|
|
145
150
|
ResolveChildWorkflowExecutionStartSuccess succeeded = 2;
|
|
@@ -148,54 +153,54 @@ message ResolveChildWorkflowExecutionStart {
|
|
|
148
153
|
}
|
|
149
154
|
}
|
|
150
155
|
|
|
151
|
-
|
|
156
|
+
// Simply pass the run_id to lang
|
|
152
157
|
message ResolveChildWorkflowExecutionStartSuccess {
|
|
153
158
|
string run_id = 1;
|
|
154
159
|
}
|
|
155
160
|
|
|
156
|
-
|
|
161
|
+
// Provide lang the cause of failure
|
|
157
162
|
message ResolveChildWorkflowExecutionStartFailure {
|
|
158
|
-
|
|
159
|
-
|
|
163
|
+
// Lang should have this information but it's more convenient to pass it back
|
|
164
|
+
// for error construction on the lang side.
|
|
160
165
|
string workflow_id = 1;
|
|
161
166
|
string workflow_type = 2;
|
|
162
167
|
child_workflow.StartChildWorkflowExecutionFailedCause cause = 3;
|
|
163
168
|
}
|
|
164
169
|
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
// `failure` should be ChildWorkflowFailure with cause set to CancelledFailure.
|
|
171
|
+
// The failure is constructed in core for lang's convenience.
|
|
167
172
|
message ResolveChildWorkflowExecutionStartCancelled {
|
|
168
173
|
temporal.api.failure.v1.Failure failure = 1;
|
|
169
174
|
}
|
|
170
175
|
|
|
171
|
-
|
|
176
|
+
// Notify a workflow that a child workflow execution has been resolved
|
|
172
177
|
message ResolveChildWorkflowExecution {
|
|
173
|
-
|
|
178
|
+
// Sequence number as provided by lang in the corresponding StartChildWorkflowExecution command
|
|
174
179
|
uint32 seq = 1;
|
|
175
180
|
child_workflow.ChildWorkflowResult result = 2;
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
|
|
183
|
+
// Update the workflow's random seed
|
|
179
184
|
message UpdateRandomSeed {
|
|
180
185
|
uint64 randomness_seed = 1;
|
|
181
186
|
}
|
|
182
187
|
|
|
183
|
-
|
|
188
|
+
// Query a workflow
|
|
184
189
|
message QueryWorkflow {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
190
|
+
// For PollWFTResp `query` field, this will be set to the special value `legacy`. For the
|
|
191
|
+
// `queries` field, the server provides a unique identifier. If it is a `legacy` query,
|
|
192
|
+
// lang cannot issue any commands in response other than to answer the query.
|
|
188
193
|
string query_id = 1;
|
|
189
|
-
|
|
194
|
+
// The query's function/method/etc name
|
|
190
195
|
string query_type = 2;
|
|
191
196
|
repeated temporal.api.common.v1.Payload arguments = 3;
|
|
192
|
-
|
|
197
|
+
// Headers attached to the query
|
|
193
198
|
map<string, temporal.api.common.v1.Payload> headers = 5;
|
|
194
199
|
}
|
|
195
200
|
|
|
196
|
-
|
|
201
|
+
// Cancel a running workflow
|
|
197
202
|
message CancelWorkflow {
|
|
198
|
-
|
|
203
|
+
// Information from the cancellation request
|
|
199
204
|
repeated temporal.api.common.v1.Payload details = 1;
|
|
200
205
|
}
|
|
201
206
|
|
|
@@ -216,20 +221,20 @@ message NotifyHasPatch {
|
|
|
216
221
|
}
|
|
217
222
|
|
|
218
223
|
message ResolveSignalExternalWorkflow {
|
|
219
|
-
|
|
220
|
-
|
|
224
|
+
// Sequence number as provided by lang in the corresponding SignalExternalWorkflowExecution
|
|
225
|
+
// command
|
|
221
226
|
uint32 seq = 1;
|
|
222
|
-
|
|
223
|
-
|
|
227
|
+
// If populated, this signal either failed to be sent or was cancelled depending on failure
|
|
228
|
+
// type / info.
|
|
224
229
|
temporal.api.failure.v1.Failure failure = 2;
|
|
225
230
|
}
|
|
226
231
|
|
|
227
232
|
message ResolveRequestCancelExternalWorkflow {
|
|
228
|
-
|
|
229
|
-
|
|
233
|
+
// Sequence number as provided by lang in the corresponding
|
|
234
|
+
// RequestCancelExternalWorkflowExecution command
|
|
230
235
|
uint32 seq = 1;
|
|
231
|
-
|
|
232
|
-
|
|
236
|
+
// If populated, this signal either failed to be sent or was cancelled depending on failure
|
|
237
|
+
// type / info.
|
|
233
238
|
temporal.api.failure.v1.Failure failure = 2;
|
|
234
239
|
}
|
|
235
240
|
|