1689
priority *commonpb.Priority,
1690
inheritedAutoUpgradeInfo *deploymentpb.InheritedAutoUpgradeInfo,
1692
>
versioningOverride := inheritedVersioningOverride
1693
>
if attributes.GetVersioningOverride() != nil {
1694
versioningOverride = attributes.GetVersioningOverride()
1695
}
1696
1698
>
Namespace: targetNamespace.String(),
1699
>
WorkflowId: attributes.WorkflowId,
1700
>
WorkflowType: attributes.WorkflowType,
1701
>
TaskQueue: attributes.TaskQueue,
1702
>
Input: attributes.Input,
1703
>
Header: attributes.Header,
1704
>
WorkflowExecutionTimeout: attributes.WorkflowExecutionTimeout,
1705
>
WorkflowRunTimeout: attributes.WorkflowRunTimeout,
1706
>
WorkflowTaskTimeout: attributes.WorkflowTaskTimeout,
1707
>
1708
>
// Use the same request ID to dedupe StartWorkflowExecution calls
1709
>
RequestId: childRequestID,
1710
>
WorkflowIdReusePolicy: attributes.WorkflowIdReusePolicy,
1711
>
WorkflowIdConflictPolicy: enumspb.WORKFLOW_ID_CONFLICT_POLICY_FAIL,
1712
>
RetryPolicy: attributes.RetryPolicy,
1713
>
CronSchedule: attributes.CronSchedule,
1714
>
Memo: attributes.Memo,
1715
>
SearchAttributes: attributes.SearchAttributes,
1716
>
UserMetadata: userMetadata,
1717
>
VersioningOverride: versioningOverride,
1718
>
Priority: priority,
1719
>
TimeSkippingConfig: attributes.GetTimeSkippingConfig(),
1720
>
}
1721
>
1722
>
request := common.CreateHistoryStartWorkflowRequest(
1723
>
targetNamespaceID.String(),
1724
>
startRequest,
1725
>
&workflowspb.ParentExecutionInfo{
1726
>
NamespaceId: task.NamespaceID,
1727
>
Namespace: namespace.String(),
1728
>
Execution: &commonpb.WorkflowExecution{
1729
>
WorkflowId: task.WorkflowID,
1730
>
RunId: task.RunID,
1731
>
},
1732
>
InitiatedId: task.InitiatedEventID,
1733
>
InitiatedVersion: task.Version,
1734
>
Clock: vclock.NewVectorClock(t.shardContext.GetClusterMetadata().GetClusterID(), t.shardContext.GetShardID(), task.TaskID),
1735
>
},
1736
>
rootExecutionInfo,
1737
>
t.shardContext.GetTimeSource().Now(),
1738
>
)
1739
>
1740
>
request.SourceVersionStamp = sourceVersionStamp
1741
>
request.InheritedBuildId = inheritedBuildId
1742
>
request.InheritedPinnedVersion = inheritedPinnedVersion
1743
>
request.TimeSkippingStatePropagation = attributes.GetTimeSkippingStatePropagation()
1744
>
1745
>
// Only set the AutoUpgrade info if the Pinned version is not set.
1746
>
if request.InheritedPinnedVersion == nil {
1747
request.InheritedAutoUpgradeInfo = inheritedAutoUpgradeInfo
1748
}
1749
1751
request.StartRequest.WorkflowIdReusePolicy = enumspb.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
1752
request.StartRequest.WorkflowIdConflictPolicy = enumspb.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING