Blog

Copying and Moving SharePoint 2010 Designer Workflows

Copying and Moving SharePoint 2010 Designer Workflows

Anyone that has worked with SharePoint 2010 workflows knows what a valuable tool they can be for a variety of tasks. However, list workflows in particular suffer from a reusability problem. While site and reusable workflows are by design (and definition) reusable, list workflows are tied to a specific list. That does not mean that there are cases when copying or moving the workflow to a different site is a desired action.

I recently ran into an issue when I wanted to copy a list from one site to another along with all of the associated content and workflows. I quickly found out that while it was relatively simple to move the list and data (with a few gotchas concerning lookup columns), the workflows I had on the list were not so easy to move. Of course I could have recreated the workflow steps in SharePoint Designer on the copied list, but the number of steps I had in the workflow drove me to seek an alternative method. Here are the steps I eventually took in order to move the workflow to the copied list on a different site:

1. Select the workflow on the original list (henceforth the 'old workflow') and select "Export to Visio"

2. Create a new, blank (this is important) workflow on the copied list. The name you give it does not matter at this point. This will be the 'new workflow'.

3. Save and Publish the new workflow to the copied list.

4. Select the new workflow and "Export to Visio"

5. You should now have two *.vwi files, one for each workflow. This is where things start to get a little trickier: Change the file extension of both files to .zip

6. Surprisingly (if you have never used this trick before) you will be able to open the zip files like any other archive and edit the files inside. Unzip and open both of the newly created archives.

7. Copy the *.xoml and *.xoml.rules files from the old workflow to the new workflow.

8. Zip up the new workflow's folder and change the file extension to .vwi.

9. On the new site, use the "Import from Visio" option to create the new workflow. At this point, all the steps will have been copied over to the new site but the workflow will not function correctly if there are references to site-specific entities.

10. Edit the new workflow in SPD and look for any references that have a GUID instead of the name of the item; this indicates that it must be updated to point to the item on the new site as it was looking for the item (by GUID) that existed on the old site.

11. Publish and test the new workflow.

That is all that needs to be done to move a workflow to a different site. Using this algorithm saved me a lot of time that I would have spent recreating each step in a workflow when I only wanted to move it to another place.

Learn more about DMC's SharePoint Workflow services.

Comments

Sachin Jain
# Sachin Jain
Hi,

Thanks you for sharing the article of Slack integration on SharePoint.
This is realy very helpful for me.

I want to know one thing can we show Shared images and videos from slack to SharePoint.
Please suggest me how can i achieve this.

Thanks
Sachin
Anand Patwari
# Anand Patwari
i am good till step "7. Copy the *.xoml and *.xoml.rules files from the old workflow to the new workflow."
but when i check with "Zip up the new workflow's folder and change the file extension to .vwi." i am not sure which file file extension you are referring
because when i zip the new workflows folder i cannot change the extension of the folder to .vwi
need your help on this.
Riya
# Riya
Hi,

I tried to do the above mentioned steps, but, it failed at Step 9. It gives the error : "The file could not be found or is not a valid .vwi file". Are you sure about the steps? Can you please share screen shots? Also, my new workflow does not have any .rules file. Is it still ok if I copy the old .rules file to new one?

Regards,
Riya
Sean
# Sean
When I tried to do the Import, I get an error "The file could bot be found or is not a valid.vwi file" Any thoughts?
cheliyan
# cheliyan
hai,

I tried to do the way you mentioned. It imports the workflow in the new site.I could see no guid id's in the workflow.so ipublished.But im not receiveing any email(which my workflow will send).It is working if i create a new workflow and configure the actions.Please help me what could be the wrong

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts