8264
case historyi.TransactionPolicyActive:
8265
if ms.generateReplicationTask() {
8267
>
workflowKey := definition.NewWorkflowKey(
8268
>
ms.executionInfo.NamespaceId,
8269
>
ms.executionInfo.WorkflowId,
8270
>
ms.executionState.RunId,
8271
>
)
8272
>
firstEventID := common.EmptyEventID
8273
>
firstEventVersion := common.EmptyVersion
8274
>
nextEventID := common.EmptyEventID
8275
>
var lastVersionHistoryItem *historyspb.VersionHistoryItem
8276
>
if len(eventBatches) > 0 {
8277
firstEventID = eventBatches[0][0].EventId
8278
firstEventVersion = eventBatches[0][0].Version
8279
lastBatch := eventBatches[len(eventBatches)-1]
8280
nextEventID = lastBatch[len(lastBatch)-1].EventId + 1
8282
currentHistory, err := versionhistory.GetCurrentVersionHistory(ms.executionInfo.VersionHistories)
8283
if err != nil {