291
case *persistence.CurrentWorkflowConditionFailedError:
292
if _, ok := failedErr.RequestIDs[requestID]; ok {
294
>
// which may not have first_execution_run_id populated on records written before that
295
>
// field existed. Fall back to the mutable state we already have loaded to recover the
296
>
// canonical head-of-chain run id (mirrors StartWorkflowExecution's behavior).
297
>
firstRunID := failedErr.FirstExecutionRunID
298
>
if firstRunID == "" && currentWorkflowLease != nil &&
299
>
currentWorkflowLease.GetContext().GetWorkflowKey().RunID == failedErr.RunID {
300
>
if id, ferr := currentWorkflowLease.GetMutableState().GetFirstRunID(ctx); ferr == nil {
301
>
firstRunID = id
302
>
}
303
}
305
}
306
return startOutcome{}, err