241
workflowKey definition.WorkflowKey,
242
firstExecutionRunID string,
244
>
createRequestID := ""
245
>
for requestID, info := range requestIDs {
246
>
if info.EventType == enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED {
247
>
createRequestID = requestID
248
>
}
249
}
250
// firstExecutionRunID may be empty for records written before WorkflowExecutionState.first_execution_run_id
251
// existed. In that case return empty rather than guessing — callers must not assume RunId.
252
>
return serviceerror.NewWorkflowExecutionAlreadyStartedWithFirstExecutionRunId(
workflow_id_dedup.go
253
>
fmt.Sprintf(errMsg, workflowKey.WorkflowID, workflowKey.RunID),
254
>
createRequestID,
255
>
workflowKey.RunID,
256
>
firstExecutionRunID,
257
>
)
258
}
259