634
startTime time.Time,
635
currentMutableState historyi.MutableState,
637
>
newMutableState := NewMutableState(
638
>
shardContext,
639
>
eventsCache,
640
>
logger,
641
>
namespaceEntry,
642
>
workflowID,
643
>
runID,
644
>
startTime,
645
>
)
646
>
647
>
// carry over necessary fields from current mutable state
648
>
newMutableState.executionInfo.WorkflowExecutionTimerTaskStatus = currentMutableState.GetExecutionInfo().WorkflowExecutionTimerTaskStatus
649
>
newMutableState.executionInfo.ChildrenInitializedPostResetPoint = currentMutableState.GetExecutionInfo().ChildrenInitializedPostResetPoint
650
>
651
>
// TODO: Today other information like autoResetPoints, previousRunID, firstRunID, etc.
652
>
// are carried over in AddWorkflowExecutionStartedEventWithOptions. Ideally all information
653
>
// should be carried over here since some information is not part of the startedEvent.
654
>
return newMutableState, nil
655
>
}
656
657
func (ms *MutableStateImpl) mustInitHSM() {