39
sourceShardKey ClusterShardKey,
40
replicationTask *replicationspb.ReplicationTask,
42
>
rawInfo := replicationTask.GetRawTaskInfo()
43
>
44
>
// ArchetypeID should never be unspecified. Default to WorkflowArchetypeID.
45
>
archetypeID := chasm.WorkflowArchetypeID
46
>
if rawInfo != nil && rawInfo.ArchetypeId != chasm.UnspecifiedArchetypeID {
47
>
archetypeID = rawInfo.ArchetypeId
48
>
} else {
49
softassert.That(processToolBox.Logger, false, "delete execution replication task has unspecified archetype ID")
50
}
51
53
>
ProcessToolBox: processToolBox,
54
>
ComponentRef: chasm.NewComponentRefByArchetypeID(
55
>
chasm.ExecutionKey{
56
>
NamespaceID: rawInfo.GetNamespaceId(),
57
>
BusinessID: rawInfo.GetWorkflowId(),
58
>
RunID: rawInfo.GetRunId(),
59
>
},
60
>
archetypeID,
61
>
),
62
>
ExecutableTask: NewExecutableTask(
63
>
processToolBox,
64
>
taskID,
65
>
metrics.DeleteExecutionReplicationTaskScope,
66
>
taskCreationTime,
67
>
time.Now().UTC(),
68
>
sourceClusterName,
69
>
sourceShardKey,
70
>
replicationTask,
71
>
),
72
>
}
73
}
74