2969
requestID string,
2970
startEvent *historypb.HistoryEvent,
2972
>
if ms.executionInfo.NamespaceId != ms.namespaceEntry.ID().String() {
2973
return serviceerror.NewInternalf("applying conflicting namespace ID: %v != %v",
2974
ms.executionInfo.NamespaceId, ms.namespaceEntry.ID().String())
2975
}
2977
return serviceerror.NewInternalf("applying conflicting workflow ID: %v != %v",
2978
ms.executionInfo.WorkflowId, execution.GetWorkflowId())
2979
}
2981
return serviceerror.NewInternalf("applying conflicting run ID: %v != %v",
2982
ms.executionState.RunId, execution.GetRunId())
2983
}
2984
2986
>
ms.AttachRequestID(requestID, startEvent.EventType, startEvent.EventId)
2987
>
2988
>
ms.approximateSize -= ms.executionInfo.Size()
2989
>
ms.executionInfo.FirstExecutionRunId = event.GetFirstExecutionRunId()
2990
>
ms.executionInfo.TaskQueue = event.TaskQueue.GetName()
2991
>
ms.executionInfo.WorkflowTypeName = event.WorkflowType.GetName()
2992
>
ms.executionInfo.WorkflowRunTimeout = event.GetWorkflowRunTimeout()
2993
>
ms.executionInfo.WorkflowExecutionTimeout = event.GetWorkflowExecutionTimeout()
2994
>
ms.executionInfo.DefaultWorkflowTaskTimeout = event.GetWorkflowTaskTimeout()
2995
>
ms.executionInfo.OriginalExecutionRunId = event.GetOriginalExecutionRunId()
2996
>
2997
>
ms.approximateSize -= ms.executionState.Size()
2998
>
ms.executionState.FirstExecutionRunId = event.GetFirstExecutionRunId()
2999
>
if err := ms.addCompletionCallbacks(
3000
>
startEvent,
3001
>
requestID,
3002
>
event.GetCompletionCallbacks(),
3003
>
); err != nil {
3004
return err
3005
}
3007
>
enumsspb.WORKFLOW_EXECUTION_STATE_CREATED,
3008
>
enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
3009
>
); err != nil {
3010
return err
3011
}
3012
>
ms.executionInfo.LastCompletedWorkflowTaskStartedEventId = common.EmptyEventID
mutable_state_impl.go
3013
>
ms.executionInfo.LastFirstEventId = startEvent.GetEventId()
3014
>
3015
>
ms.executionInfo.WorkflowTaskVersion = common.EmptyVersion
3016
>
ms.executionInfo.WorkflowTaskScheduledEventId = common.EmptyEventID
3017
>
ms.executionInfo.WorkflowTaskStartedEventId = common.EmptyEventID
3018
>
ms.executionInfo.WorkflowTaskRequestId = emptyUUID
3019
>
ms.executionInfo.WorkflowTaskTimeout = timestamp.DurationFromSeconds(0)
3020
>
3021
>
ms.executionInfo.CronSchedule = event.GetCronSchedule()
3022
>
3023
>
if event.ParentWorkflowExecution != nil {
3024
ms.executionInfo.ParentNamespaceId = event.GetParentWorkflowNamespaceId()
3025
ms.executionInfo.ParentWorkflowId = event.ParentWorkflowExecution.GetWorkflowId()