@@ -350,22 +350,42 @@ If you need to move a pinned Workflow to a new version, use `temporal workflow u
350350
351351``` bash
352352temporal workflow update-options \
353- --workflow-id=" MyWorkflowId" \
354- --versioning-override-behavior=pinned \
355- --versioning-override-pinned-version=" $MY_DEPLOYMENT_VERSION "
353+ --workflow-id " $WORKFLOW_ID " \
354+ --versioning-override-behavior pinned \
355+ --versioning-override-deployment-name " $TARGET_DEPLOYMENT " \
356+ --versioning-override-build-id " $TARGET_BUILD_ID "
356357```
357358
358359You can move several Workflows at once matching a ` --query ` parameter:
359360
360361``` bash
361362temporal workflow update-options \
362- --query=" TemporalWorkerDeploymentVersion=$MY_BAD_DEPLOYMENT_VERSION " \
363- --versioning-override-behavior=pinned \
364- --versioning-override-pinned-version=" $MY_PATCH_DEPLOYMENT_VERSION "
363+ --query=" TemporalWorkerDeploymentVersion=$TARGET_DEPLOYMENT :$BAD_BUILD_ID " \
364+ --versioning-override-behavior pinned \
365+ --versioning-override-deployment-name " $TARGET_DEPLOYMENT " \
366+ --versioning-override-build-id " $FIXED_BUILD_ID "
365367```
366368
367369In this scenario, you may also need to use the other [ Versioning APIs] ( /workflow-definition#workflow-versioning ) to patch your Workflow.
368370
371+ If the target Worker version that you want to move stuck Workflows to does not have the code paths necessary to reproduce the
372+ Events in the History of your stuck Workflows, you could use patching as mentioned above, or you could do a Workflow Reset.
373+ Only Reset your Workflow if you can tolerate losing progress and re-triggering Actions, among the other usual consequences of
374+ Workflow Reset. However, if your Workflow was broken and/or did not make much progress, Reset can be a very helpful tool!
375+
376+ "Reset-with-Move" allows you to atomically Reset your Workflow and set a Versioning Override on the newly reset workflow execution,
377+ so when it resumes execution, all new workflow tasks will be executed on your new Worker.
378+
379+ ``` bash
380+ temporal workflow reset with-workflow-update-options \
381+ --workflow-id " $WORKFLOW_ID " \
382+ --event-id " $EVENT_ID " \
383+ --reason " $REASON " \
384+ --versioning-override-behavior pinned \
385+ --versioning-override-deployment-name " $TARGET_DEPLOYMENT " \
386+ --versioning-override-build-id " $TARGET_BUILD_ID "
387+ ```
388+
369389## Sunsetting an old Deployment Version
370390
371391A Worker Deployment Version moves through the following states:
0 commit comments