Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog

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):

  1. Create a new workflow on the new list(B).
  2. Create at least one step, one condition and one action in this workflow. This ensures that the two files above discussed are created.
  3. From the original workflow(in List A) open the .xoml file as XML and copy the entire contents to the clipboard.
  4. Open the .xoml file for the new workflow and replace the entire contents with the content you have copied in the step 3.
  5. Do the same for the xoml.rules file too.
  6. Now open the .xoml file for the new workflow & verify the workflow. Ensure the workflow is correct by clicking Check Workflow.

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.

  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 theSourceWorkflowName.vwi file.
  9. Now, go to the destination site, open workflows and click Import from Visio and browse to theSourceWorkflowName.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.

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.

https://www.harepoint.com/Products/HarePointWorkflowMigration/Default.aspx

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

http://blog.karstein-consulting.com/2011/02/10/walkthrough-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 Name

Workflow Name

List 1

List Workflow 1

List 2

List Workflow 2 (Copied from the worlflow1)

Step 1)

We have the list 1 with list workflow 1 to be copied to list workflow 2.

Step 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

Step 3)

Now in the side of navigation click All Files

Step 4)

In all files click the Workflows

Step 5)

Open the List workflow 1 and also repeat the steps 3,4 and open List workflow 2 in another tab

Step 6)

List workflow 1 and list workflow 2 are will be displaying like this when you have done the steps 3,4,5 correctly.

Step 7)

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

Step 8)

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.

Step 9)

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://soussi-imed.over-blog.com/2015/03/copying-sharepoint-designer-2010-workflows.html

Copying SharePoint Designer 2010 Workflows
Tag(s) : #SharePoint
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :