Copying/Moving SharePoint 2010 Designer Workflows

Posted: January 2, 2012 in Sharepoint 2010, Sharepoint Designer, Workflows

Most often, we required moving or copying a workflow that is created using SharePoint designer between sites or site collections. This was straight forward in SharePoint Designer 2007. You just need to copy the content of the workflow’s config(workflow.xoml.wfconfig.xml) file and the rules file & replaced the list GUID’s. But in SharePoint Designer 2010, there is a little tweak associated with it.

There was an option in SharePoint Designer, Export to Visio which exports your workflow as a .vwi file, and can be imported in to another site using the option Import from Visio.  But when you try that option, you will get the below message.

This workflow cannot be imported because it was created in SharePoint Designer for a different site, or the original workflow has been moved or deleted. To move a workflow between sites, use Save as Template (.wsp file) instead of a Visio workflow drawing.

So, to achieve the same follow the steps below.

  1.  In the first(source) site, create the required workflow and publish it.
  2. Now select Export to Visio option which allows you to save the workflow with a .vwi extension. (Refer this workflow hereafter as source workflow).
  3. Now go to the destination site where you want the workflow to be copied, and create a new workflow with the same name as the previous one & publish it.
  4. Now select Export to Visio option which allows you to save the workflow with a .vwi extension. (Refer this workflow hereafter as Destination workflow).
  5. Now you will be having two .vwi files (one of source workflow’s – SourceWorkflowName.vwi  and other of the destination workflow’s – DestinationWorkflowName.vwi). Now add .zip extension to both the files. Now your files names should be SourceWorkflowName.vwi.zip & DestinationWorkflowName.vwi.zip.
  6. 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).
  7. From now on, we will not use the file DestinationWorkflowName.vwi.zip.  So ignore that file.
  8. Remove the .zip extension from SourceWorkflowName.vwi.zip which gives you the   SourceWorkflowName.vwi file.
  9. Now, go to the destination site, open workflows and click Import from Visio and browse to the SourceWorkflowName.vwi file.
  10. That’s it and your workflow is copied. You can publish the workflow and run it.

PS : 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.

Hope this helps.

Advertisements
Comments
  1. Mario says:

    Brilliant workaround!

  2. Stephen says:

    This is Genius!

  3. Niren says:

    after importing SPD WF with this I lost my Lookup values in Variable it shows GUIDs

  4. @Niren – In case if the source site & the destination site are different, look ups will not persist… You need to manually remap the lookups…

  5. Keith Eatwell says:

    This sounds like a great fix, but it is not allowing me to copy the “workflow.xoml.wfconfig.xml” file from the destination to the source. No error, it just does not happen. Any clue?

  6. Arun says:

    Wont we able to get the infopath task forms ?

  7. ichiranjit says:

    super boss i was in trouble. i have created around 35-40 step workflow and i exported the work could not revert back as i deleted the list and workflow too. luckily i had the exported vwi file .i re-created blank workflow exported it and followed your steps. and it worked like magic. thanks a ton.

  8. Aasai says:

    Please, Can you say is it possible to do this way in Sharepoint Online ?

  9. horodav says:

    very usefull 🙂

  10. rhico27 says:

    Reblogged this on Sapere aude. and commented:
    This method worked great!

  11. scott says:

    This is great – thanks.

  12. Ryout says:

    Copy file from one zip to desktop and then to the other zip.

  13. Jeff Binter says:

    golden station thanks

  14. Sylwia says:

    Najgłupszy serwis paintballowy świata to http://www.paintball.info.pl. Klocek to debil i idiota robi z nas debili okrada nas i nic nie daje w zamian.

  15. Agustin says:

    Many thanks!!!
    I have just translated it to Spanish (español) and published it to my blog.

    Link: http://sharepointenespanol.blogspot.com.ar/2013/06/copiar-workflow-de-un-sitio-otro.html

    Regards.

  16. there is more simple and save way to move the workflows from DEV to production or from one site to another or even from one Farm to another: the third party tool HarePoint Workflow Migration (www.harepoint.com). It can be started on a workstation and you just need to connect to the source web-site and to destination web-site. Few mouse clicks and the workflows will be copied or moved.

  17. sitopix says:

    I did this successfully up to the import from visio #9 step. Once I removed the zip extension, the file remains a zip file. When I try to import visio file, the error “The file could not be found or is not a valid vwi file.” Can you please help?

  18. T. Soprano says:

    When I try this, it says “This workflow cannot be imported because it was created in SharePoint Designer for a different site …Any suggestions? I’m using SPD 2010. Thanks.

  19. somitra says:

    thanks sir your mathod saved lots of time. Please add to this post by explaining why copying the particular file actually tranfers all the workflow steps .

  20. John says:

    The zip file also contains a rules file. The rules file has a public key. Should that be copied in addition to the config file?

  21. sai says:

    Hi I have done the complete process but then when i unzipped and then tried to import it say “The file couldn’t be found or the .vwi is not file”. Kindly reply me back.

  22. Alvin U says:

    I’m having the same problem T. Soprano: “This workflow cannot be imported because it was created in SharePoint Designer for a different site “

  23. gaurav says:

    Instead of creating zip files, just open the source and destination workflows in SPD and overwrite the wfconfig file from source to destination from All files option in SPD and thats it!

  24. PCM says:

    Hi Jaya, I created a 2013 designer list workflow and generated the wsp for it. I uploaded the same to the destination solution gallery and activated it. But while activating the feature it is throwing error. And when I open the destination site the workflow appeared In designer , but when I try to edit the workflow(Because the association of tasks list and history list should be changed as it varies across env) it is giving windows workflow foundation .net frame 3.0 not installed. I browsed in the net and found that need to delete the designer cache..I did it. But getting the same problem.

    Can you give me an idea what is the best way to move/copy the List workflow from dev to prod..

    Thanks in advance.

    PCM

    • Once way could be deploying the task lists definition with the same ID in the destination site. But if you say you are getting a wsp, is it a reusable workflow? There should be no issues in that case.

  25. Tim Carfrey says:

    This saved me a ton of time.

  26. Shankara says:

    Thanks a lot Chanakya. This saved me at least couple days of development and deployment time.

  27. Janaka LP says:

    Really great article. Thanks a lot!

  28. Monique says:

    Do you know if this will work will copying and moving a list workflow from a 2010 environment to 2013?

  29. Danielle says:

    Thanks a bunch! This was extremely helpful! I thought that I had lost all of my rules and extensive email forms.

    Another method I found when working through your awesome suggestion was that you can actually also just copy and paste right from both .xoml.wfconfig.xml files within SPD 2010. Simply start by copying and pasting the workflow from one site collection to the other and then copy and paste into the .xoml.wfconfig.xml file for the new workflow of the destination site.

  30. Om says:

    Chanakya,
    I am dealing with relatively complex [list] workflow (with embedded power-shells etc) that ends up creating a new site and SP user groups.
    Workflow has an task handler collecting feedback from users. I was asked to add more columns to list [and task related content type] for which I modified the workflow .xsn forms with infoPath designer and. initially my changes worked fine but at some point browser can not open the form and “The form template failed to Ioad.”
    This could be that at some point I saved the form on my desktop and published it.
    Now I have no idea where to save my template which hopefully resolves the issue.
    Any idea?

  31. Smith says:

    Great tips worked well. One issue I saw is we are doing a simple Notification WF and some of the fields came over.. and most did not.

  32. RomaPete says:

    Huge thank you for this! I thought I was going to have to recreate my 3 workflows one agonizing step at a time. You saved me all that trouble!

  33. Chris says:

    Unfortunately for me, i can’t follow the above procedure because when i rename the *.vwi.zip back to *.vwi, the file stays as a zip file. We don’t have Visio here, and we don’t have regular zip, just SecureZip, so this will not work. Thank you for the post nonetheless.

    • Rocky Son says:

      You can easily change that *.zip extension back to *.vwi.

      Steps:
      1)Go to MyComputer—On the top left Click on “Organize” button.
      2)Then ‘Folder and search options’.
      3) select ‘View’ tab–Uncheck “Hide extensions for known file types” under Advanced settings.
      4)Click on “Apply”
      5)Now goto the destination file and you can find .zip extension to the file.
      6)Remove .zip extension and save.

    • Please look into Lepide SharePoint migration tool that might be a good alternative choice for you.

  34. Samir Warsi says:

    A Big Thanks to You.. Man… You saved our great amount of time…

    God Bless You dude…

  35. patleterrible says:

    Thanks a lot for this great workaround

  36. Tom says:

    This was awesome! Great time-saver – thought I was going to have to manually copy the workflow over! Thank you for posting this!

  37. Pleas checkout this informative article that covers step-wise instructions while migrating from SharePoint 2010 to SharePoint 2013 : http://www.lepide.com/blog/step-by-step-guide-to-migrate-from-sharepoint-2010-to-sharepoint-2013/

  38. ryanweldron says:

    Very informative post about workflows moving, thanks for the share. I would like to share a programmed solution that allows to move SharePoint designer workflows easily: http://www.lepide.com/lepidemigratordocuments/sharepoint-to-sharepoint-migration.html

  39. Matt C says:

    Thank you, thank you, thank you! 🙂

  40. […] Source: Copying/Moving SharePoint 2010 Designer Workflows […]

  41. assia says:

    i have this message when importiong the source files :”you must close all views of this workflowbefore importing this file”

  42. Max says:

    I have followed this instruction and also deleted the original workflows, then created the replacement workflows (Destination) to get the workflow.xoml and the wfconfig.xml. When importing from visio I get the error message “This workflow cannot be imported because it was created in SharePoint Desinger for a different site, or the original workflow has been moved or deleted. To move a workflow between sites, use Save as Template (.wsp file) instead of a Visio workflow drawing.” Please help. Do I need to restore the original workflows somehow? If so…how?

  43. Frank Leung says:

    Hi I know its a bit late but do you have any more detail such as a step by step guide, to copying a SharePoint 2007 workflow to SharePoint 2016,bearing in mind, I can’t use any version of SharePoint Designer on both version sof SharePoint

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s