Skip to content

Commit

Permalink
Rename DecisionTask to WorkflowTask (temporalio#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin authored Jul 11, 2020
1 parent 33175ea commit d104c88
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 113 deletions.
10 changes: 5 additions & 5 deletions temporal/api/enums/v1/event_type.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ enum EventType {
EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED = 2;
EVENT_TYPE_WORKFLOW_EXECUTION_FAILED = 3;
EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT = 4;
EVENT_TYPE_DECISION_TASK_SCHEDULED = 5;
EVENT_TYPE_DECISION_TASK_STARTED = 6;
EVENT_TYPE_DECISION_TASK_COMPLETED = 7;
EVENT_TYPE_DECISION_TASK_TIMED_OUT = 8;
EVENT_TYPE_DECISION_TASK_FAILED = 9;
EVENT_TYPE_WORKFLOW_TASK_SCHEDULED = 5;
EVENT_TYPE_WORKFLOW_TASK_STARTED = 6;
EVENT_TYPE_WORKFLOW_TASK_COMPLETED = 7;
EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT = 8;
EVENT_TYPE_WORKFLOW_TASK_FAILED = 9;
EVENT_TYPE_ACTIVITY_TASK_SCHEDULED = 10;
EVENT_TYPE_ACTIVITY_TASK_STARTED = 11;
EVENT_TYPE_ACTIVITY_TASK_COMPLETED = 12;
Expand Down
50 changes: 25 additions & 25 deletions temporal/api/enums/v1/failed_cause.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@ option java_package = "io.temporal.api.enums.v1";
option java_multiple_files = true;
option java_outer_classname = "FailedCauseProto";

enum DecisionTaskFailedCause {
DECISION_TASK_FAILED_CAUSE_UNSPECIFIED = 0;
DECISION_TASK_FAILED_CAUSE_UNHANDLED_DECISION = 1;
DECISION_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES = 2;
DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES = 3;
DECISION_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES = 4;
DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES = 5;
DECISION_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES = 6;
DECISION_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES = 7;
DECISION_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES = 8;
DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES = 9;
DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 10;
DECISION_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES = 11;
DECISION_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID = 12;
DECISION_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE = 13;
DECISION_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE = 14;
DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 15;
DECISION_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES = 16;
DECISION_TASK_FAILED_CAUSE_FORCE_CLOSE_DECISION = 17;
DECISION_TASK_FAILED_CAUSE_FAILOVER_CLOSE_DECISION = 18;
DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE = 19;
DECISION_TASK_FAILED_CAUSE_RESET_WORKFLOW = 20;
DECISION_TASK_FAILED_CAUSE_BAD_BINARY = 21;
DECISION_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID = 22;
DECISION_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES = 23;
enum WorkflowTaskFailedCause {
WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED = 0;
WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_DECISION = 1;
WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES = 2;
WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES = 3;
WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES = 4;
WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES = 5;
WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES = 6;
WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES = 7;
WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES = 8;
WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES = 9;
WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 10;
WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES = 11;
WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID = 12;
WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE = 13;
WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE = 14;
WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 15;
WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES = 16;
WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_DECISION = 17;
WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_DECISION = 18;
WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE = 19;
WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW = 20;
WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY = 21;
WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID = 22;
WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES = 23;
}

enum StartChildWorkflowExecutionFailedCause {
Expand Down
4 changes: 2 additions & 2 deletions temporal/api/enums/v1/task_queue.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ enum TaskQueueKind {

enum TaskQueueType {
TASK_QUEUE_TYPE_UNSPECIFIED = 0;
// Decision type of task queue.
TASK_QUEUE_TYPE_DECISION = 1;
// Workflow type of task queue.
TASK_QUEUE_TYPE_WORKFLOW = 1;
// Activity type of task queue.
TASK_QUEUE_TYPE_ACTIVITY = 2;
}
58 changes: 29 additions & 29 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ message WorkflowExecutionStartedEventAttributes {
// This time is passed without change to the next run/retry of a workflow.
int64 workflow_execution_expiration_timestamp = 19;
string cron_schedule = 20;
int32 first_decision_task_backoff_seconds = 21;
int32 first_workflow_task_backoff_seconds = 21;
temporal.api.common.v1.Memo memo = 22;
temporal.api.common.v1.SearchAttributes search_attributes = 23;
temporal.api.workflow.v1.ResetPoints prev_auto_reset_points = 24;
Expand All @@ -74,13 +74,13 @@ message WorkflowExecutionStartedEventAttributes {

message WorkflowExecutionCompletedEventAttributes {
temporal.api.common.v1.Payloads result = 1;
int64 decision_task_completed_event_id = 2;
int64 workflow_task_completed_event_id = 2;
}

message WorkflowExecutionFailedEventAttributes {
temporal.api.failure.v1.Failure failure = 1;
temporal.api.enums.v1.RetryState retry_state = 2;
int64 decision_task_completed_event_id = 3;
int64 workflow_task_completed_event_id = 3;
}

message WorkflowExecutionTimedOutEventAttributes {
Expand All @@ -97,7 +97,7 @@ message WorkflowExecutionContinuedAsNewEventAttributes {
int32 workflow_run_timeout_seconds = 5;
// Timeout of a single workflow task.
int32 workflow_task_timeout_seconds = 6;
int64 decision_task_completed_event_id = 7;
int64 workflow_task_completed_event_id = 7;
int32 backoff_start_interval_in_seconds = 8;
temporal.api.enums.v1.ContinueAsNewInitiator initiator = 9;
temporal.api.failure.v1.Failure failure = 10;
Expand All @@ -107,35 +107,35 @@ message WorkflowExecutionContinuedAsNewEventAttributes {
temporal.api.common.v1.SearchAttributes search_attributes = 14;
}

message DecisionTaskScheduledEventAttributes {
message WorkflowTaskScheduledEventAttributes {
temporal.api.taskqueue.v1.TaskQueue task_queue = 1;
int32 start_to_close_timeout_seconds = 2;
int64 attempt = 3;
}

message DecisionTaskStartedEventAttributes {
message WorkflowTaskStartedEventAttributes {
int64 scheduled_event_id = 1;
string identity = 2;
string request_id = 3;
}

message DecisionTaskCompletedEventAttributes {
message WorkflowTaskCompletedEventAttributes {
int64 scheduled_event_id = 1;
int64 started_event_id = 2;
string identity = 3;
string binary_checksum = 4;
}

message DecisionTaskTimedOutEventAttributes {
message WorkflowTaskTimedOutEventAttributes {
int64 scheduled_event_id = 1;
int64 started_event_id = 2;
temporal.api.enums.v1.TimeoutType timeout_type = 3;
}

message DecisionTaskFailedEventAttributes {
message WorkflowTaskFailedEventAttributes {
int64 scheduled_event_id = 1;
int64 started_event_id = 2;
temporal.api.enums.v1.DecisionTaskFailedCause cause = 3;
temporal.api.enums.v1.WorkflowTaskFailedCause cause = 3;
temporal.api.failure.v1.Failure failure = 4;
string identity = 5;
// For reset workflow.
Expand Down Expand Up @@ -164,7 +164,7 @@ message ActivityTaskScheduledEventAttributes {
int32 start_to_close_timeout_seconds = 9;
// Maximum time between successful worker heartbeats.
int32 heartbeat_timeout_seconds = 10;
int64 decision_task_completed_event_id = 11;
int64 workflow_task_completed_event_id = 11;
// Activities are provided by a default retry policy controlled through the service dynamic configuration.
// Retries are happening up to schedule_to_close_timeout.
// To disable retries set retry_policy.maximum_attempts to 1.
Expand Down Expand Up @@ -204,7 +204,7 @@ message ActivityTaskTimedOutEventAttributes {

message ActivityTaskCancelRequestedEventAttributes {
int64 scheduled_event_id = 1;
int64 decision_task_completed_event_id = 2;
int64 workflow_task_completed_event_id = 2;
}

message ActivityTaskCanceledEventAttributes {
Expand All @@ -218,7 +218,7 @@ message ActivityTaskCanceledEventAttributes {
message TimerStartedEventAttributes {
string timer_id = 1;
int64 start_to_fire_timeout_seconds = 2;
int64 decision_task_completed_event_id = 3;
int64 workflow_task_completed_event_id = 3;
}

message TimerFiredEventAttributes {
Expand All @@ -229,14 +229,14 @@ message TimerFiredEventAttributes {
message TimerCanceledEventAttributes {
string timer_id = 1;
int64 started_event_id = 2;
int64 decision_task_completed_event_id = 3;
int64 workflow_task_completed_event_id = 3;
string identity = 4;
}

message CancelTimerFailedEventAttributes {
string timer_id = 1;
string cause = 2;
int64 decision_task_completed_event_id = 3;
int64 workflow_task_completed_event_id = 3;
string identity = 4;
}

Expand All @@ -248,14 +248,14 @@ message WorkflowExecutionCancelRequestedEventAttributes {
}

message WorkflowExecutionCanceledEventAttributes {
int64 decision_task_completed_event_id = 1;
int64 workflow_task_completed_event_id = 1;
temporal.api.common.v1.Payloads details = 2;
}

message MarkerRecordedEventAttributes {
string marker_name = 1;
map<string, temporal.api.common.v1.Payloads> details = 2;
int64 decision_task_completed_event_id = 3;
int64 workflow_task_completed_event_id = 3;
temporal.api.common.v1.Header header = 4;
temporal.api.failure.v1.Failure failure = 5;
}
Expand All @@ -273,7 +273,7 @@ message WorkflowExecutionTerminatedEventAttributes {
}

message RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {
int64 decision_task_completed_event_id = 1;
int64 workflow_task_completed_event_id = 1;
string namespace = 2;
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
string control = 4;
Expand All @@ -282,7 +282,7 @@ message RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {

message RequestCancelExternalWorkflowExecutionFailedEventAttributes {
temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause cause = 1;
int64 decision_task_completed_event_id = 2;
int64 workflow_task_completed_event_id = 2;
string namespace = 3;
temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
int64 initiated_event_id = 5;
Expand All @@ -296,7 +296,7 @@ message ExternalWorkflowExecutionCancelRequestedEventAttributes {
}

message SignalExternalWorkflowExecutionInitiatedEventAttributes {
int64 decision_task_completed_event_id = 1;
int64 workflow_task_completed_event_id = 1;
string namespace = 2;
temporal.api.common.v1.WorkflowExecution workflow_execution = 3;
string signal_name = 4;
Expand All @@ -307,7 +307,7 @@ message SignalExternalWorkflowExecutionInitiatedEventAttributes {

message SignalExternalWorkflowExecutionFailedEventAttributes {
temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause cause = 1;
int64 decision_task_completed_event_id = 2;
int64 workflow_task_completed_event_id = 2;
string namespace = 3;
temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
int64 initiated_event_id = 5;
Expand All @@ -322,7 +322,7 @@ message ExternalWorkflowExecutionSignaledEventAttributes {
}

message UpsertWorkflowSearchAttributesEventAttributes {
int64 decision_task_completed_event_id = 1;
int64 workflow_task_completed_event_id = 1;
temporal.api.common.v1.SearchAttributes search_attributes = 2;
}

Expand All @@ -341,7 +341,7 @@ message StartChildWorkflowExecutionInitiatedEventAttributes {
// Default: PARENT_CLOSE_POLICY_TERMINATE.
temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9;
string control = 10;
int64 decision_task_completed_event_id = 11;
int64 workflow_task_completed_event_id = 11;
// Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 12;
temporal.api.common.v1.RetryPolicy retry_policy = 13;
Expand All @@ -358,7 +358,7 @@ message StartChildWorkflowExecutionFailedEventAttributes {
temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause cause = 4;
string control = 5;
int64 initiated_event_id = 6;
int64 decision_task_completed_event_id = 7;
int64 workflow_task_completed_event_id = 7;
}

message ChildWorkflowExecutionStartedEventAttributes {
Expand Down Expand Up @@ -425,11 +425,11 @@ message HistoryEvent {
WorkflowExecutionCompletedEventAttributes workflow_execution_completed_event_attributes = 7;
WorkflowExecutionFailedEventAttributes workflow_execution_failed_event_attributes = 8;
WorkflowExecutionTimedOutEventAttributes workflow_execution_timed_out_event_attributes = 9;
DecisionTaskScheduledEventAttributes decision_task_scheduled_event_attributes = 10;
DecisionTaskStartedEventAttributes decision_task_started_event_attributes = 11;
DecisionTaskCompletedEventAttributes decision_task_completed_event_attributes = 12;
DecisionTaskTimedOutEventAttributes decision_task_timed_out_event_attributes = 13;
DecisionTaskFailedEventAttributes decision_task_failed_event_attributes = 14;
WorkflowTaskScheduledEventAttributes workflow_task_scheduled_event_attributes = 10;
WorkflowTaskStartedEventAttributes workflow_task_started_event_attributes = 11;
WorkflowTaskCompletedEventAttributes workflow_task_completed_event_attributes = 12;
WorkflowTaskTimedOutEventAttributes workflow_task_timed_out_event_attributes = 13;
WorkflowTaskFailedEventAttributes workflow_task_failed_event_attributes = 14;
ActivityTaskScheduledEventAttributes activity_task_scheduled_event_attributes = 15;
ActivityTaskStartedEventAttributes activity_task_started_event_attributes = 16;
ActivityTaskCompletedEventAttributes activity_task_completed_event_attributes = 17;
Expand Down
26 changes: 13 additions & 13 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ message GetWorkflowExecutionHistoryResponse {
bool archived = 4;
}

message PollForDecisionTaskRequest {
message PollWorkflowTaskQueueRequest {
string namespace = 1;
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
string identity = 3;
string binary_checksum = 4;
}

message PollForDecisionTaskResponse {
message PollWorkflowTaskQueueResponse {
bytes task_token = 1;
temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
temporal.api.common.v1.WorkflowType workflow_type = 3;
Expand All @@ -192,40 +192,40 @@ message PollForDecisionTaskResponse {
map<string, temporal.api.query.v1.WorkflowQuery> queries = 14;
}

message RespondDecisionTaskCompletedRequest {
message RespondWorkflowTaskCompletedRequest {
bytes task_token = 1;
repeated temporal.api.decision.v1.Decision decisions = 2;
string identity = 3;
temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4;
bool return_new_decision_task = 5;
bool force_create_new_decision_task = 6;
bool return_new_workflow_task = 5;
bool force_create_new_workflow_task = 6;
string binary_checksum = 7;
map<string, temporal.api.query.v1.WorkflowQueryResult> query_results = 8;
}

message RespondDecisionTaskCompletedResponse {
PollForDecisionTaskResponse decision_task = 1;
message RespondWorkflowTaskCompletedResponse {
PollWorkflowTaskQueueResponse workflow_task = 1;
}

message RespondDecisionTaskFailedRequest {
message RespondWorkflowTaskFailedRequest {
bytes task_token = 1;
temporal.api.enums.v1.DecisionTaskFailedCause cause = 2;
temporal.api.enums.v1.WorkflowTaskFailedCause cause = 2;
temporal.api.failure.v1.Failure failure = 3;
string identity = 4;
string binary_checksum = 5;
}

message RespondDecisionTaskFailedResponse {
message RespondWorkflowTaskFailedResponse {
}

message PollForActivityTaskRequest {
message PollActivityTaskQueueRequest {
string namespace = 1;
temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
string identity = 3;
temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4;
}

message PollForActivityTaskResponse {
message PollActivityTaskQueueResponse {
bytes task_token = 1;
string workflow_namespace = 2;
temporal.api.common.v1.WorkflowType workflow_type = 3;
Expand Down Expand Up @@ -573,5 +573,5 @@ message ListTaskQueuePartitionsRequest {

message ListTaskQueuePartitionsResponse {
repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata activity_task_queue_partitions = 1;
repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata decision_task_queue_partitions = 2;
repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata workflow_task_queue_partitions = 2;
}
Loading

0 comments on commit d104c88

Please sign in to comment.