Workflow name aliasing and DisableAlreadyRegisteredCheck

Hi, I am looking to use an alias only for some workflows, for others i want to execute using the function reference. I understand i need to do this through setting the RegisterWorkflowOptions. However, I’m confused about what DisableAlreadyRegisteredCheck and worker.Options.DisableRegistrationAliasing do? Can’t seem to find more information on this in the go docs.

I also see this on the comments on the RegisterWorkflowWithOptions function

// This method panics if workflowFunc doesn't comply with the expected format or tries to register the same workflow
// type name twice. Use workflow.RegisterOptions.DisableAlreadyRegisteredCheck to allow multiple registrations.

How would temporal know which workflow to execute if i register different workflows with the same name?

Thanks!

@maxim apologies if question didnt make sense. I guess my main question is, what is the use of DisableAlreadyRegisteredCheck?

I’ve had a look at Foundations - Go SDK feature guide | Temporal Documentation but just confused as to why you’d want to disable the check

I believe it was created for unit testing where individual tests could override specific activities.