Switch workflow execution to another Namespace/Task queue

Hi, I’m trying to understand how it will work if we change the Namespace or Task queue in the middle of a workflow execution. Our use case is that we have 3-5 Namespaces to represent workflow categories, and in 1 Namespace we have 3-5 task queues to execute different workflows based on priorities.

Let’s say we have a workflow_1 and our service will call Temporal to start execution whenever our upstream service sends us an event, and the workflow_1 is originally configured to run on Namespace_A and Task_queue_A1.

Then assume we find that the workflow category/priority needs to change, which means we need to switch the workflow execution to Namespace_B, or Task_queue_A2 under Namespace_A, my questions are:

  • What would happen to the already started workflow execution in Namespace_A and Task_queue_A1 if they are still in the middle of processing? Will they just exit in the middle, meaning that we’ll drop those executions?
  • Any general guidance on how to handle the Namespace switch or Task queue switch smoother? Ideally we do not want to drop or stop workflow execution in the middle and not sure if it’s possible to gracefully transition/migrate the workflow execution to another Namespace or Task queue in the middle of an execution.

Thank you in advance!

Switching workflow namespace and task queue is not currently supported. Would you file a feature request explaining your requirements, please?

Thank you @maxim for the prompt reply! I can file a feature request, but I would still like to understand what would happen to the in-flight workflow executions in the old Namespace/Task queue, assuming we will not kill/change the worker that listens to the old namespace and queue, and just make a code change to route workflow execution to a new Namespace using a new WorkflowClient, or route workflow execution to a new task queue using a different WorkflowOptions. Wanted to have a better understanding of the impact to the in-flight workflow executions so we can evaluate if it is acceptable to us or figuring out any workarounds. Thanks!