diff --git a/common/types/mapper/proto/api.go b/common/types/mapper/proto/api.go index cdceb403b36..211adfa1262 100644 --- a/common/types/mapper/proto/api.go +++ b/common/types/mapper/proto/api.go @@ -4697,6 +4697,7 @@ func FromWorkflowExecutionInfo(t *types.WorkflowExecutionInfo) *apiv1.WorkflowEx AutoResetPoints: FromResetPoints(t.AutoResetPoints), TaskList: t.TaskList, PartitionConfig: t.PartitionConfig, + IsCron: t.IsCron, } } @@ -4721,6 +4722,7 @@ func ToWorkflowExecutionInfo(t *apiv1.WorkflowExecutionInfo) *types.WorkflowExec AutoResetPoints: ToResetPoints(t.AutoResetPoints), TaskList: t.TaskList, PartitionConfig: t.PartitionConfig, + IsCron: t.IsCron, } } diff --git a/common/types/mapper/proto/api_test.go b/common/types/mapper/proto/api_test.go index 867af44a2eb..2d25baf009f 100644 --- a/common/types/mapper/proto/api_test.go +++ b/common/types/mapper/proto/api_test.go @@ -792,7 +792,7 @@ func TestParentExecutionInfoFields(t *testing.T) { assert.Equal(t, testdata.ParentExecutionInfo.InitiatedID, *ToParentInitiatedID(info)) } func TestWorkflowExecutionInfo(t *testing.T) { - for _, item := range []*types.WorkflowExecutionInfo{nil, {}, &testdata.WorkflowExecutionInfo} { + for _, item := range []*types.WorkflowExecutionInfo{nil, {}, &testdata.WorkflowExecutionInfo, &testdata.CronWorkflowExecutionInfo} { assert.Equal(t, item, ToWorkflowExecutionInfo(FromWorkflowExecutionInfo(item))) } } diff --git a/common/types/testdata/common.go b/common/types/testdata/common.go index 4c03843f9be..43572aa87e0 100644 --- a/common/types/testdata/common.go +++ b/common/types/testdata/common.go @@ -344,6 +344,25 @@ var ( TaskList: TaskListName, PartitionConfig: PartitionConfig, } + CronWorkflowExecutionInfo = types.WorkflowExecutionInfo{ + Execution: &WorkflowExecution, + Type: &WorkflowType, + StartTime: &Timestamp1, + CloseTime: &Timestamp2, + CloseStatus: &WorkflowExecutionCloseStatus, + HistoryLength: HistoryLength, + ParentDomainID: common.StringPtr(DomainID), + ParentDomain: common.StringPtr(DomainName), + ParentExecution: &WorkflowExecution, + ParentInitiatedID: common.Int64Ptr(EventID1), + ExecutionTime: &Timestamp3, + Memo: &Memo, + SearchAttributes: &SearchAttributes, + AutoResetPoints: &ResetPoints, + TaskList: TaskListName, + PartitionConfig: PartitionConfig, + IsCron: true, + } WorkflowExecutionInfoArray = []*types.WorkflowExecutionInfo{&WorkflowExecutionInfo} WorkflowQuery = types.WorkflowQuery{