458
// sanity check if new workflow is already created
459
// since workflow resend can have already created the new workflow
461
>
newExecutionState := newWorkflow.GetMutableState().GetExecutionState()
462
>
newWorkflowExists, err := r.transactionMgr.CheckWorkflowExists(
463
>
ctx,
464
>
namespace.ID(newExecutionInfo.NamespaceId),
465
>
newExecutionInfo.WorkflowId,
466
>
newExecutionState.RunId,
467
>
archetypeID,
468
>
)
469
>
if err != nil {
470
return err
471
}
473
// new workflow already exists, do not create again
474
newContext = nil
475
newMutableState = nil
477
// new workflow does not exist, continue
478
newContext = newWorkflow.GetContext()