333
events []*historypb.HistoryEvent,
334
requestID string,
336
>
337
>
_, err := stateBuilder.ApplyEvents(
338
>
ctx,
339
>
namespace.ID(workflowKey.NamespaceID),
340
>
requestID,
341
>
&commonpb.WorkflowExecution{
342
>
WorkflowId: workflowKey.WorkflowID,
343
>
RunId: workflowKey.RunID,
344
>
},
345
>
[][]*historypb.HistoryEvent{events},
346
>
nil, // no new run history when rebuilding mutable state
347
>
"",
348
>
)
349
>
if err != nil {
350
r.logger.Error("StateRebuilder unable to Rebuild mutable state.", tag.Error(err))
351
return err
352
}
354
}
355