Ingo Karstein's Blog

SharePoint Pleasure

Walkthrough: How to move or copy a SharePoint Designer 2010 List Workflow to another list on the same site or another site.

Posted by ikarstein on 2011/02/10

I had to develop a Holiday Approval Workflow with SharePoint Designer 2010. – I used a “List Workflow”. – Bad mistake! – It’s not possible to copy this kind of workflow to another list on the same site or another site.

I thought I could use the “Export to Visio” functionality with the workflow at my development site and the “Import from Visio” functionality at the destination list. – That’s impossible. You get this message:

image

(“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.”)

You cannot “Save as Template” because it’s a “List Workflow”.

Okay. – I’ve found a workaround.

Let’s do it in detail.

1. Create a site collection “http://sharepoint.local/sites/dev”.

2. Open SharePoint Designer 2010. Open the previously created site.

3. Open the “Workflows” view.

4. On the Ribbon click “List Workflow” and select “Shared Documents”. – We will create a workflow for the list “Shared Documents”.

image

Name the workflow “Workflow 1”. Leave “Description” empty.

image

5. Insert any workflow steps you like.

image

6. Change the workflow settings. Select “Task List” and “History List”.

image

7. Click “Publish” to publish the workflow Winking smile

8. Click “Export to Visio”. Save to Workflow as .vwi file, e.g. on the desktop.

image

9. Let’s test the workflow. – I’ve created a text file “test.txt” on the desktop. Now I upload the file to the “Shared Documents” library of “http://sharepoint.local/sites/dev”.

image

Open the item context menu. Click “Workflow”.

image

Manually start the “Workflow 1”.

*image

Click “Start”.

image

In the list view you see the workflow status.

image

Click on the status. In my case it’s “Completed”.

image

The workflow history says “Workflow executed” as specified in the workflow definition above.

10. Okay. Let’s copy the workflow to the production site “http://sharepoint.local”. – A simple “import” is impossible, because it’s a list workflow… Follow my steps.

11. Start the SharePoint Designer 2010 and open the site “http://sharepoint.local”.

12. On the Ribbon click “List Workflow” and select “Shared Documents”. – We will create a workflow for the list “Shared Documents”.

image

Name the workflow “Workflow 1 Production”. Leave “Description” empty.

image

11. Do not add any workflow step!

12. Click on “Workflow Settings” menu item on the Ribbon.

13. Click “Publish” to publish the (empty) workflow.

14. After publishing click “Export to Visio” and save the file as “workflow 1 production.vwi” on the desktop.

15. Open a Windows Explorer. Select “Desktop”. You see both “.vwi” files.

16. Add the extension “.zip” to both files.

image

 

17. Open both “.vwi.zip” files. You see:

image

18. Copy “workflow.xoml.wfconfig” from “workflow 1 production.vwi.zip” to “workflow 1.vwi.zip”.

image

19. Now remove the “.zip” extension from both files. You’ll get two “.vwi” files.

image

20. In SharePoint Designer 2010 open the site “http://sharepoint.local”.

21. Click “Import from Visio” and select “workflow 1.vwi”

image

image

Click “Next”. (Maybe you get a message: “You must close all views of this workflow before importing this file.” Then stop the import. Close all views of the Workflow and restart from Step 21.)

22. Now you see the this window:

image

That it!

23. Now the workflow designer opens:

image

24. Now you can publish the workflow and test it…

25. Be as happy as me with that !!!

PS: Of course you can use any library as destination. In the sample above it does not have to be “Shared Documents” on “http://sharepoint.local” It could be another list or library as well!

Advertisement

29 Responses to “Walkthrough: How to move or copy a SharePoint Designer 2010 List Workflow to another list on the same site or another site.”

  1. Brent said

    Thank You!!!

  2. Donal said

    When I look in the source workflow zip, it includes a workflow.xoml.rules file that is not in the target zip, should I copy this also?

    Also, the workflow.xoml file in the target zip is 2kb, whereas the file in the source is 27kb.

    Thanks

  3. arut said

    Thanks a lot

  4. Vishwas Setty said

    Hi,

    This is an amazing post, worked so very well… So very clear in understanding and following. One thing I would like to add is about renaming it. Once the file is renamed to .vwi.zip and to rename it back to .vwi use the folder options in the folder where you save and choose and uncheck “Hide file extensions for known file types”. Then click rename and delete the .zip from it.

    Thanks again….

  5. Osman Kumas said

    This is the most helpfully post regarding to workflow moving I have ever read. Thank you

  6. Senthil said

    Awesome! It works like charm.. i have been running around for this and finally got urs and made my day easier. Though it looks a bit unorthodox, it works.

    Thanks,
    Senthil.

  7. Khaniya Sunil said

    Excellent Job man…..

    • ikarstein said

      Thanks :-)

  8. Collin said

    AWESOME! This saved me about 1 million years worth of work! :-)

  9. Rick said

    Thanks heaps, this saved me a lot of time and fustration….

  10. Such a great help! Thanks for the post. I spent quite a while trying to figure this out.

  11. Steve Lloyd said

    Props! This trick just saved me at least one mornings work!

  12. Ashutosh Dhande said

    Hey Ingo,

    Great Post…

    Very Helpful…

    Thanxxxxxxxxxxx…

    -Ashutosh

  13. thendral58 said

    Hi Karstein,

    Thanks for the post………

    Is it possible to create loops inside a List workflow………like in a workflow with steps 1,2,3,4,5,6,7,8,9 …..
    If “Yes” there will be steps in between like 1,2,3,4,5,6,7,8, else if “No” few steps will be skipped like 1,2,6,7,8 ….

    Is this possible…….in SPD2010 Worflows……..

    else atleast is it possible to copy a few steps in a workflow and paste them elsewhere in the same workflow…….

    Need a quick solution….. Thanks a lot

    Regards,
    Thendral

  14. [...] http://ikarstein.wordpress.com/2011/02/10/walkthrough-how-to-move-or-copy-a-sharepoint-designer-2010… Share this:TwitterFacebookLike this:LikeBe the first to like this post. This entry was posted in Sharepoint. Bookmark the permalink. ← Notepad++ – add remote access plugin [...]

  15. [...] http://ikarstein.wordpress.com/2011/02/10/walkthrough-how-to-move-or-copy-a-sharepoint-designer-2010… [...]

  16. user said

    Thanks a bunch for your excellent post here. Saved us a lot of time. THANK YOU!!!

  17. Moe said

    Really good work! Does anybody know how i copy the workflow forms with the workflow?

    • ikarstein said

      Moe,

      this forms are XSN files, aren’t they? You shout be able to copy them with SharePoint designer. Maybe you need to change their names in the Workflow Visio file. Just rename the Visio-Export-File to “.zip”, open it as described in my article, and look for the workflow forms. I’ve seen them. – Try to copy them with SharEPoint Designer 2010 from the source location to the destination after importing the workflow.

      Ingo

      • Daniel said

        hi ingo,

        this doesn’t seem to work for me. i got a list workflow which includes two approval workflows with forms. i cannot find these forms in the zip file. in sharepoint designer i’m also unable to copy the forms; the only options i get are open and delete.

        everything works as you describe regarding the copying, but when i check the approval steps, not only the forms are missing, the outcomes are not there either. i cannot add any outcomes manually for some reason.

        so the copied workflow starts off as expected, sends the emails out and all, but the user cannot open the form, as they are not there.

        any ideas?

        thank you very much for your brilliant blog and especially these instructions. they have helped me copy a number of list workflows from my dev to production …

        kind regards,

        Daniel

  18. John said

    hi, really good job. Does anybody knows how to copy the forms of the workflow?

    • ikarstein said

      Same question as Moe’s.

  19. dudeu said

    Excellent post, wonderful job which save my life.

    • ikarstein said

      Thanks a lot :-)

  20. Burdell said

    AWESOME – thanks so much! I was about to make huge changes to a workflow at the client’s request, and I really wanted to save a copy of all the work I’d already put into the thing, just in case she changed her mind later.

    • ikarstein said

      Hi! – I’m happy about your success! :-) – Kind regards, Ingo

  21. [...] Check this article on how to move the Workflow between lists Leave a Comment LikeBe the first to like this [...]

  22. Hans said

    Thanks man! Wonderful

  23. vinit said

    hey dude, excellent post, really helped me alot, keep up the good work.

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 )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 38 other followers