797
798
if r.mutableState.GetExecutionState().State == enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED {
800
>
taskEquivalents = []tasks.Task{&tasks.SyncWorkflowStateTask{
801
>
// TaskID, VisibilityTimestamp is set by shard
802
>
WorkflowKey: workflowKey,
803
>
Version: lastItem.GetVersion(),
804
>
Priority: enumsspb.TASK_PRIORITY_LOW,
805
>
TargetClusters: targetClusters,
806
>
IsForceReplication: true,
807
>
}}
808
>
}
809
>
if r.mutableState.IsTransitionHistoryEnabled() &&
810
>
// even though current cluster may enabled state transition, but transition history can be cleared
811
>
// by processing a replication task from a cluster that has state transition disabled
812
>
len(executionInfo.TransitionHistory) > 0 {
813
814
transitionHistory := executionInfo.TransitionHistory