Want to change the Workflow to the existing instances

Hi All,

We have used various Workflows for creating the VM instances on both On-prem and Cloud. So i think that all the instances are mapped to respective Workflows to the run the Teardown Phase task while deleting the VM through the Morpheus.
Now we planned to cleanup Workflows and also created a new workflow which will be suitable for all the conditions in our Environment.
I wanted to replace the old workflows entry from the existing VM instance which we used during provisioning with the new one which we created. So that all the Instance will follow the same teardown process while deleting the VM from the Morpheus.
I cannot able to find any API which gives the workflow ID or Workflow Name which an instance is mapped.(USED https://apidocs.morpheusdata.com/reference/getinstance) and Request you all to guide to replace the existing Workflow to new Workflow. so i can Delete the workflows in our Morpheus and will have only one workflow which will be suitable for all the conditions in our Environment.

Thanks in Advance

@Praveen_Kumar can you try by updating the workflow in the layout?

Hi @aabraham ,

Thanks for the reply.

we can mention the workflow in the Layouts. but we used many layouts for provisioning the VM and also we have deleted few.
I am not sure whether changing the workflow in the layout which is already used to build VM will replace the new workflow in the instance level.
I need to change the workflow which used during the provisioning the VM to the new Workflow which we created in instance level. So it will run the new Teardown task which is used in the new Workflow during deletion.