106
updateReg update.Registry,
107
ms historyi.MutableState,
108
>
) (*api.UpdateWorkflowAction, error) {
api.go
109
>
if u.req.GetRequest().GetFirstExecutionRunId() != "" &&
110
>
ms.GetExecutionInfo().GetFirstExecutionRunId() != u.req.GetRequest().GetFirstExecutionRunId() {
111
return nil, consts.ErrWorkflowExecutionNotFound
112
}
113
114
>
u.wfKey = ms.GetWorkflowKey()
api.go
115
>
updateRequest := u.req.GetRequest().GetRequest()
116
>
updateID := updateRequest.GetMeta().GetUpdateId()
117
>
118
>
if !ms.IsWorkflowExecutionRunning() {
119
// If the WF is not running anymore, use an existing Update, if it exists for the requested ID.
120
// This ensures that repeated Update requests with the same ID see the same result.