300
// sanity check if new workflow is already created
301
// since workflow resend can have already created the new workflow
303
>
newExecutionState := newWorkflow.GetMutableState().GetExecutionState()
304
>
newWorkflowExists, err := r.transactionMgr.CheckWorkflowExists(
305
>
ctx,
306
>
namespace.ID(newExecutionInfo.NamespaceId),
307
>
newExecutionInfo.WorkflowId,
308
>
newExecutionState.RunId,
309
>
archetypeID,
310
>
)
311
>
if err != nil {
312
return err
313
}
315
// new workflow already exists, do not create again
316
newContext = nil
317
newMutableState = nil
318
newTransactionPolicy = nil
320
// new workflow does not exist, continue
321
newContext = newWorkflow.GetContext()