Whenever you save a list as a template & use it somewhere else, the designer workflow you have associated with the old list will not be restored. There is no option OOB to copy/move a workflow. But luckily this can be done through the SharePoint Designer. Here below two files play a major role,
The .xoml.wfconfig.xml file contains information on the list the workflow is bound to using the List’s ID.
The file .xoml.rules contains the ‘conditions’ you program for the workflow and the “.xoml” file contains the ‘actions’.
To re-use a workflow you have created in one list(Say List A) in another list(Say List B):
- Create a new workflow on the new list(B).
- Create at least one step, one condition and one action in this workflow. This ensures that the two files above discussed are created.
- From the original workflow(in List A) open the .xoml file as XML and copy the entire contents to the clipboard.
- Open the .xoml file for the new workflow and replace the entire contents with the content you have copied in the step 3.
- Do the same for the xoml.rules file too.
- Now open the .xoml file for the new workflow & verify the workflow. Ensure the workflow is correct by clicking Check Workflow.
Copying/Moving SharePoint 2010 Designer Workflows
Most often, we required moving or copying a workflow that is created using SharePoint designer between sites or site collections.
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.
- In the first(source) site, create the required workflow 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).
- 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.
- Now select Export to Visio option which allows you to save the workflow with a .vwi extension. (Refer this workflow hereafter as Destination workflow).
- 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.
- 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 DestinationWorkflowName.vwi.zip. So ignore that file.
- Remove the .zip extension from SourceWorkflowName.vwi.zip which gives you the SourceWorkflowName.vwi file.
- Now, go to the destination site, open workflows and click Import from Visio and browse to the SourceWorkflowName.vwi file.
- 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.
HarePoint Workflow Migration for SharePoint
HarePoint Workflow Migration for SharePoint – this is an ideal tool for simple, quick, and error-free migration of the most complex workflows from one SharePoint environment to another.
How to move or copy a SharePoint Designer 2010 List Workflow to another list on the same site or another site.
How to copy SharePoint list workflow
We often face a situation where we need to copy a big workflow from list or library to another list or library. This situation can be avoided if we have created the workflow as reusable workflow.
So in this article I will explain in simple steps on how to copy a list workflow to another workflow using SharePoint designer. Using this method we can copy workflow across site collections are web applications.
For this we have the following
List Workflow 1
List Workflow 2 (Copied from the worlflow1)
We have the list 1 with list workflow 1 to be copied to list workflow 2.
Now create a list workflow 2 , in list 2 with one condition plus once activity and save it.
In our example I have used a condition and sending email to current user. This is used to create the Xoml rules for the list workflow 2
Now in the side of navigation click All Files
In all files click the Workflows
Open the List workflow 1 and also repeat the steps 3,4 and open List workflow 2 in another tab
List workflow 1 and list workflow 2 are will be displaying like this when you have done the steps 3,4,5 correctly.
Copy the .xoml and xoml.rules to the targeted workflow.
In our example List workflow 1.xoml and list workflow 1.xoml.rules are copied from list workflow 1 folder to list workflow 2 folder
Rename the files from List workflow 1.xoml to List workflow 2.xoml
And list workflow 1.xoml.rules to list workflow 2.xoml.rules
While renaming a working message will be displayed click Yes.
Now close and reopen the SharePoint designer.
After opening the List workflow 2 we can notice the workflow has been copied from list workflow 1.
Source : http://www.sharepointbasic.com/2012/04/how-to-copy-sharepoint-list-workflow.html