Copying SharePoint 2010 Workflows
When working with SharePoint Workflows, we are usually required to moving or copying a workflow that is created using SharePoint designer between sites or SharePoint List (including the document library, form library…). Following is the How-To steps
To accomplish this, we will use a little tweak associated with the workflow.
- In the original (source) site or list, create the required workflow, save and publish it.
- Now select Export to Visio option which allows you to save the workflow with a .vwi extension. (Refer this workflow hereafter as source workflow). For instance, Source_WF.vwi
- Now go to the destination site or list where you want the workflow to be copied, and create a new workflow with the same name as the previous one & publish it.
- Do the same thing at step 2, select Export to Visio option which allows you to save the workflow with a .vwi extension. (Refer this workflow hereafter as Destination workflow). For instance, Destination_WF.vwi
- Now you will be having two .vwi files (one of source workflow’s – Source_WF.vwi and other of the destination workflow’s – Destination_WF.vwi). Now add .zip extension to both the files. Now your files names should be Source_WF.vwi.zip & Destination_WF.vwi.zip.
- Now open both the zip files, copy workflow.xoml.wfconfig.xml from destination workflow to source workflow. (Its destination to source and not source to destination).
- From now on, we will not use the file Destination_WF.vwi.zip. So ignore that file.
- Remove the .zip extension from Source_WF.vwi.zip which gives you the Source_WF.vwi file.
- Now, go to the destination site, open workflows and click Import from Visio and browse to the Source_WF.vwi file.
That’s it and your workflow is copied. You can publish the workflow and run it.
Note: In case if your list’s GUID’s (for those lists that you have used in workflow – tasks list, history list or any other lists used in workflow steps) have been changed from source & destination site, you may need to update those steps in the workflow.
Cheers.