Skip to content

Commit

Permalink
expose workflowExecutionTasklist in PollForDecisionTaskResponse (cade…
Browse files Browse the repository at this point in the history
…nce-workflow#1007)

* expose workflowExecutionTasklist in PollForDecisionTaskResponse
  • Loading branch information
halakaraki authored Jul 31, 2018
1 parent bd79b91 commit 0b1e42a
Show file tree
Hide file tree
Showing 15 changed files with 336 additions and 59 deletions.
4 changes: 2 additions & 2 deletions .gen/go/history/idl.go

Large diffs are not rendered by default.

54 changes: 44 additions & 10 deletions .gen/go/history/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .gen/go/matching/idl.go

Large diffs are not rendered by default.

60 changes: 47 additions & 13 deletions .gen/go/matching/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .gen/go/shared/idl.go

Large diffs are not rendered by default.

58 changes: 46 additions & 12 deletions .gen/go/shared/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions common/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func TaskListKindPtr(t s.TaskListKind) *s.TaskListKind {
return &t
}

// TaskListTypePtr makes a copy and returns the pointer to a TaskListKind.
func TaskListTypePtr(t s.TaskListType) *s.TaskListType {
return &t
}

// DecisionTaskFailedCausePtr makes a copy and returns the pointer to a DecisionTaskFailedCause.
func DecisionTaskFailedCausePtr(t s.DecisionTaskFailedCause) *s.DecisionTaskFailedCause {
return &t
Expand Down
17 changes: 9 additions & 8 deletions common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,15 @@ func GenerateRandomString(n int) string {
// CreateMatchingPollForDecisionTaskResponse create response for matching's PollForDecisionTask
func CreateMatchingPollForDecisionTaskResponse(historyResponse *h.RecordDecisionTaskStartedResponse, workflowExecution *workflow.WorkflowExecution, token []byte) *m.PollForDecisionTaskResponse {
matchingResp := &m.PollForDecisionTaskResponse{
WorkflowExecution: workflowExecution,
TaskToken: token,
Attempt: Int64Ptr(historyResponse.GetAttempt()),
WorkflowType: historyResponse.WorkflowType,
StartedEventId: historyResponse.StartedEventId,
StickyExecutionEnabled: historyResponse.StickyExecutionEnabled,
NextEventId: historyResponse.NextEventId,
DecisionInfo: historyResponse.DecisionInfo,
WorkflowExecution: workflowExecution,
TaskToken: token,
Attempt: Int64Ptr(historyResponse.GetAttempt()),
WorkflowType: historyResponse.WorkflowType,
StartedEventId: historyResponse.StartedEventId,
StickyExecutionEnabled: historyResponse.StickyExecutionEnabled,
NextEventId: historyResponse.NextEventId,
DecisionInfo: historyResponse.DecisionInfo,
WorkflowExecutionTaskList: historyResponse.WorkflowExecutionTaskList,
}
if historyResponse.GetPreviousStartedEventId() != EmptyEventID {
matchingResp.PreviousStartedEventId = historyResponse.PreviousStartedEventId
Expand Down
1 change: 1 addition & 0 deletions idl/github.com/uber/cadence/history.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ struct RecordDecisionTaskStartedResponse {
60: optional i64 (js.type = "Long") attempt
70: optional bool stickyExecutionEnabled
80: optional shared.TransientDecisionInfo decisionInfo
90: optional shared.TaskList WorkflowExecutionTaskList
}

struct SignalWorkflowExecutionRequest {
Expand Down
1 change: 1 addition & 0 deletions idl/github.com/uber/cadence/matching.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct PollForDecisionTaskResponse {
70: optional bool stickyExecutionEnabled
80: optional shared.WorkflowQuery query
90: optional shared.TransientDecisionInfo decisionInfo
100: optional shared.TaskList WorkflowExecutionTaskList
}

struct PollForActivityTaskRequest {
Expand Down
1 change: 1 addition & 0 deletions idl/github.com/uber/cadence/shared.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ struct PollForDecisionTaskResponse {
60: optional History history
70: optional binary nextPageToken
80: optional WorkflowQuery query
90: optional TaskList WorkflowExecutionTaskList
}

struct StickyExecutionAttributes {
Expand Down
Loading

0 comments on commit 0b1e42a

Please sign in to comment.