Skip to content

Commit 471e835

Browse files
authored
Rename Decision to Command (#73)
1 parent d104c88 commit 471e835

File tree

6 files changed

+74
-74
lines changed

6 files changed

+74
-74
lines changed
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@
2222

2323
syntax = "proto3";
2424

25-
package temporal.api.decision.v1;
25+
package temporal.api.command.v1;
2626

27-
option go_package = "go.temporal.io/api/decision/v1;decision";
28-
option java_package = "io.temporal.api.decision.v1";
27+
option go_package = "go.temporal.io/api/command/v1;command";
28+
option java_package = "io.temporal.api.command.v1";
2929
option java_multiple_files = true;
3030
option java_outer_classname = "MessageProto";
3131

3232
import "temporal/api/enums/v1/workflow.proto";
33-
import "temporal/api/enums/v1/decision_type.proto";
33+
import "temporal/api/enums/v1/command_type.proto";
3434
import "temporal/api/common/v1/message.proto";
3535
import "temporal/api/failure/v1/message.proto";
3636
import "temporal/api/taskqueue/v1/message.proto";
3737

38-
message ScheduleActivityTaskDecisionAttributes {
38+
message ScheduleActivityTaskCommandAttributes {
3939
string activity_id = 1;
4040
temporal.api.common.v1.ActivityType activity_type = 2;
4141
string namespace = 3;
@@ -61,40 +61,40 @@ message ScheduleActivityTaskDecisionAttributes {
6161
temporal.api.common.v1.RetryPolicy retry_policy = 11;
6262
}
6363

64-
message RequestCancelActivityTaskDecisionAttributes {
64+
message RequestCancelActivityTaskCommandAttributes {
6565
int64 scheduled_event_id = 1;
6666
}
6767

68-
message StartTimerDecisionAttributes {
68+
message StartTimerCommandAttributes {
6969
string timer_id = 1;
7070
int64 start_to_fire_timeout_seconds = 2;
7171
}
7272

73-
message CompleteWorkflowExecutionDecisionAttributes {
73+
message CompleteWorkflowExecutionCommandAttributes {
7474
temporal.api.common.v1.Payloads result = 1;
7575
}
7676

77-
message FailWorkflowExecutionDecisionAttributes {
77+
message FailWorkflowExecutionCommandAttributes {
7878
temporal.api.failure.v1.Failure failure = 1;
7979
}
8080

81-
message CancelTimerDecisionAttributes {
81+
message CancelTimerCommandAttributes {
8282
string timer_id = 1;
8383
}
8484

85-
message CancelWorkflowExecutionDecisionAttributes {
85+
message CancelWorkflowExecutionCommandAttributes {
8686
temporal.api.common.v1.Payloads details = 1;
8787
}
8888

89-
message RequestCancelExternalWorkflowExecutionDecisionAttributes {
89+
message RequestCancelExternalWorkflowExecutionCommandAttributes {
9090
string namespace = 1;
9191
string workflow_id = 2;
9292
string run_id = 3;
9393
string control = 4;
9494
bool child_workflow_only = 5;
9595
}
9696

97-
message SignalExternalWorkflowExecutionDecisionAttributes {
97+
message SignalExternalWorkflowExecutionCommandAttributes {
9898
string namespace = 1;
9999
temporal.api.common.v1.WorkflowExecution execution = 2;
100100
string signal_name = 3;
@@ -103,25 +103,25 @@ message SignalExternalWorkflowExecutionDecisionAttributes {
103103
bool child_workflow_only = 6;
104104
}
105105

106-
message UpsertWorkflowSearchAttributesDecisionAttributes {
106+
message UpsertWorkflowSearchAttributesCommandAttributes {
107107
temporal.api.common.v1.SearchAttributes search_attributes = 1;
108108
}
109109

110-
message RecordMarkerDecisionAttributes {
110+
message RecordMarkerCommandAttributes {
111111
string marker_name = 1;
112112
map<string, temporal.api.common.v1.Payloads> details = 2;
113113
temporal.api.common.v1.Header header = 3;
114114
temporal.api.failure.v1.Failure failure = 4;
115115
}
116116

117-
message ContinueAsNewWorkflowExecutionDecisionAttributes {
117+
message ContinueAsNewWorkflowExecutionCommandAttributes {
118118
temporal.api.common.v1.WorkflowType workflow_type = 1;
119119
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
120120
temporal.api.common.v1.Payloads input = 3;
121-
// workflowExecutionTimeout is omitted as it shouldn'be overridden from within a workflow
122-
// Timeout of a single workflow run
121+
// workflow_execution_timeout is omitted as it shouldn'be overridden from within a workflow.
122+
// Timeout of a single workflow run.
123123
int32 workflow_run_timeout_seconds = 4;
124-
// Timeout of a single workflow task
124+
// Timeout of a single workflow task.
125125
int32 workflow_task_timeout_seconds = 5;
126126
int32 backoff_start_interval_in_seconds = 6;
127127
temporal.api.common.v1.RetryPolicy retry_policy = 7;
@@ -134,17 +134,17 @@ message ContinueAsNewWorkflowExecutionDecisionAttributes {
134134
temporal.api.common.v1.SearchAttributes search_attributes = 14;
135135
}
136136

137-
message StartChildWorkflowExecutionDecisionAttributes {
137+
message StartChildWorkflowExecutionCommandAttributes {
138138
string namespace = 1;
139139
string workflow_id = 2;
140140
temporal.api.common.v1.WorkflowType workflow_type = 3;
141141
temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
142142
temporal.api.common.v1.Payloads input = 5;
143-
// Total workflow execution timeout including retries and continue as new
143+
// Total workflow execution timeout including retries and continue as new.
144144
int32 workflow_execution_timeout_seconds = 6;
145-
// Timeout of a single workflow run
145+
// Timeout of a single workflow run.
146146
int32 workflow_run_timeout_seconds = 7;
147-
// Timeout of a single workflow task
147+
// Timeout of a single workflow task.
148148
int32 workflow_task_timeout_seconds = 8;
149149
// Default: PARENT_CLOSE_POLICY_TERMINATE.
150150
temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9;
@@ -158,21 +158,21 @@ message StartChildWorkflowExecutionDecisionAttributes {
158158
temporal.api.common.v1.SearchAttributes search_attributes = 16;
159159
}
160160

161-
message Decision {
162-
temporal.api.enums.v1.DecisionType decision_type = 1;
161+
message Command {
162+
temporal.api.enums.v1.CommandType command_type = 1;
163163
oneof attributes {
164-
ScheduleActivityTaskDecisionAttributes schedule_activity_task_decision_attributes = 2;
165-
StartTimerDecisionAttributes start_timer_decision_attributes = 3;
166-
CompleteWorkflowExecutionDecisionAttributes complete_workflow_execution_decision_attributes = 4;
167-
FailWorkflowExecutionDecisionAttributes fail_workflow_execution_decision_attributes = 5;
168-
RequestCancelActivityTaskDecisionAttributes request_cancel_activity_task_decision_attributes = 6;
169-
CancelTimerDecisionAttributes cancel_timer_decision_attributes = 7;
170-
CancelWorkflowExecutionDecisionAttributes cancel_workflow_execution_decision_attributes = 8;
171-
RequestCancelExternalWorkflowExecutionDecisionAttributes request_cancel_external_workflow_execution_decision_attributes = 9;
172-
RecordMarkerDecisionAttributes record_marker_decision_attributes = 10;
173-
ContinueAsNewWorkflowExecutionDecisionAttributes continue_as_new_workflow_execution_decision_attributes = 11;
174-
StartChildWorkflowExecutionDecisionAttributes start_child_workflow_execution_decision_attributes = 12;
175-
SignalExternalWorkflowExecutionDecisionAttributes signal_external_workflow_execution_decision_attributes = 13;
176-
UpsertWorkflowSearchAttributesDecisionAttributes upsert_workflow_search_attributes_decision_attributes = 14;
164+
ScheduleActivityTaskCommandAttributes schedule_activity_task_command_attributes = 2;
165+
StartTimerCommandAttributes start_timer_command_attributes = 3;
166+
CompleteWorkflowExecutionCommandAttributes complete_workflow_execution_command_attributes = 4;
167+
FailWorkflowExecutionCommandAttributes fail_workflow_execution_command_attributes = 5;
168+
RequestCancelActivityTaskCommandAttributes request_cancel_activity_task_command_attributes = 6;
169+
CancelTimerCommandAttributes cancel_timer_command_attributes = 7;
170+
CancelWorkflowExecutionCommandAttributes cancel_workflow_execution_command_attributes = 8;
171+
RequestCancelExternalWorkflowExecutionCommandAttributes request_cancel_external_workflow_execution_command_attributes = 9;
172+
RecordMarkerCommandAttributes record_marker_command_attributes = 10;
173+
ContinueAsNewWorkflowExecutionCommandAttributes continue_as_new_workflow_execution_command_attributes = 11;
174+
StartChildWorkflowExecutionCommandAttributes start_child_workflow_execution_command_attributes = 12;
175+
SignalExternalWorkflowExecutionCommandAttributes signal_external_workflow_execution_command_attributes = 13;
176+
UpsertWorkflowSearchAttributesCommandAttributes upsert_workflow_search_attributes_command_attributes = 14;
177177
}
178178
}
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ package temporal.api.enums.v1;
2727
option go_package = "go.temporal.io/api/enums/v1;enums";
2828
option java_package = "io.temporal.api.enums.v1";
2929
option java_multiple_files = true;
30-
option java_outer_classname = "DecisionTypeProto";
30+
option java_outer_classname = "CommandTypeProto";
3131

32-
// Whenever this list of decision is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering.
33-
enum DecisionType {
34-
DECISION_TYPE_UNSPECIFIED = 0;
35-
DECISION_TYPE_SCHEDULE_ACTIVITY_TASK = 1;
36-
DECISION_TYPE_REQUEST_CANCEL_ACTIVITY_TASK = 2;
37-
DECISION_TYPE_START_TIMER = 3;
38-
DECISION_TYPE_COMPLETE_WORKFLOW_EXECUTION = 4;
39-
DECISION_TYPE_FAIL_WORKFLOW_EXECUTION = 5;
40-
DECISION_TYPE_CANCEL_TIMER = 6;
41-
DECISION_TYPE_CANCEL_WORKFLOW_EXECUTION = 7;
42-
DECISION_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION = 8;
43-
DECISION_TYPE_RECORD_MARKER = 9;
44-
DECISION_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION = 10;
45-
DECISION_TYPE_START_CHILD_WORKFLOW_EXECUTION = 11;
46-
DECISION_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION = 12;
47-
DECISION_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 13;
32+
// Whenever this list of command types is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering.
33+
enum CommandType {
34+
COMMAND_TYPE_UNSPECIFIED = 0;
35+
COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK = 1;
36+
COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK = 2;
37+
COMMAND_TYPE_START_TIMER = 3;
38+
COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION = 4;
39+
COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION = 5;
40+
COMMAND_TYPE_CANCEL_TIMER = 6;
41+
COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION = 7;
42+
COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION = 8;
43+
COMMAND_TYPE_RECORD_MARKER = 9;
44+
COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION = 10;
45+
COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION = 11;
46+
COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION = 12;
47+
COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 13;
4848
}

temporal/api/enums/v1/failed_cause.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ option java_outer_classname = "FailedCauseProto";
3131

3232
enum WorkflowTaskFailedCause {
3333
WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED = 0;
34-
WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_DECISION = 1;
34+
WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND = 1;
3535
WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES = 2;
3636
WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES = 3;
3737
WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES = 4;
@@ -47,8 +47,8 @@ enum WorkflowTaskFailedCause {
4747
WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE = 14;
4848
WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 15;
4949
WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES = 16;
50-
WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_DECISION = 17;
51-
WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_DECISION = 18;
50+
WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND = 17;
51+
WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND = 18;
5252
WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE = 19;
5353
WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW = 20;
5454
WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY = 21;

temporal/api/workflow/v1/message.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ message ResetPoints {
8989
message ResetPointInfo {
9090
string binary_checksum = 1;
9191
string run_id = 2;
92-
int64 first_decision_completed_id = 3;
92+
int64 first_workflow_task_completed_id = 3;
9393
int64 create_time_nano = 4;
9494
// The time that the run is deleted due to retention.
9595
int64 expire_time_nano = 5;

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import "temporal/api/enums/v1/task_queue.proto";
3838
import "temporal/api/common/v1/message.proto";
3939
import "temporal/api/history/v1/message.proto";
4040
import "temporal/api/workflow/v1/message.proto";
41-
import "temporal/api/decision/v1/message.proto";
41+
import "temporal/api/command/v1/message.proto";
4242
import "temporal/api/failure/v1/message.proto";
4343
import "temporal/api/filter/v1/message.proto";
4444
import "temporal/api/namespace/v1/message.proto";
@@ -194,7 +194,7 @@ message PollWorkflowTaskQueueResponse {
194194

195195
message RespondWorkflowTaskCompletedRequest {
196196
bytes task_token = 1;
197-
repeated temporal.api.decision.v1.Decision decisions = 2;
197+
repeated temporal.api.command.v1.Command commands = 2;
198198
string identity = 3;
199199
temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4;
200200
bool return_new_workflow_task = 5;
@@ -396,7 +396,7 @@ message ResetWorkflowExecutionRequest {
396396
string namespace = 1;
397397
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
398398
string reason = 3;
399-
int64 decision_finish_event_id = 4;
399+
int64 workflow_task_finish_event_id = 4;
400400
string request_id = 5;
401401
}
402402

0 commit comments

Comments
 (0)