In this SharePoint designer workflow tutorial, we will discuss, how to deploy sharepoint designer workflow into production or how to copy workflow from one site to another SharePoint 2013.
Before moving the workflow from one site to another site, you need to remember below things else you might see some issues and the workflow might not be deployed properly.
- Your workflow may have associated with few other lookup lists, make sure all the lists with should be presented in the destination site.
- All the list names and URL (workflow history list and task lists and associated list) the URL and title of the list should be exactly the same. For example, if your source list contains a space in URL or title, then the destination list should also contain the space.
Here below are my source and destination SharePoint online site.
https://onlysharepoint2013.sharepoint.com/sites/Bhawana/ (Source List) https://onlysharepoint2013.sharepoint.com/sites/SharePointSky/ (Destination List)
My source list contains a list as “DemoWorkflowList” which has a workflow associated with it. We will deploy the workflow to the destination list.
- Associated List: DemoWorlkflowList
- Workflow History List: Workflow History
- Workflow Task List: Workflow Tasks
Similarly, if you have any other lists used inside the list, you have to create all those lists in the destination SharePoint Online site.
- Create list from list template programmatically in SharePoint
- Create or Update list using rest api in SharePoint 2013/2016/Online
See the lists associated into the workflow.
The 3 steps are involved in copying workflow from one site to another site.
- Save the workflow as a template
- Upload and activate the solution
- Activate the workflow feature
Save the Workflow as a template
Open the SharePoint Online source site using SharePoint designer 2013. Then from designer click on Workflows in the Site Objects which will display all the workflows in the site.
Select the workflow and click on Save as Template button from the ribbon like below:
The template will be saved to the Site Assets gallery. You can see a confirmation message like below:
Upload and activate the solution
Open the Site Assets library (you can open in the browser or you can also open in the SharePoint designer 2013 itself). Here I have opened in the designer itself. If you can not see the template then just click on the Refresh icon in the designer itself.
Then select the template and then click on Export File, which will export the file to your local drive.
You can see a successful message like below:
Now the file is in the local drive where you saved the file.
Now Open the SharePoint online destination site, and then go to the Site Settings page. On the Site Settings page click on “Solutions” which is under “Web Designer Galleries“.
Click on the Upload button and then browse to the wsp file which we have saved in the local drvie. Once it is upload, it will show you to activate the solution.
Once you click on activate, you can see the solution get activated like below:
Activate the Feature
Now go back to the Site Settings page of the destination site again and then click on “Manage site features” which is under “Site Actions“.
There search for a feature with the same name.
Example: Workflow template “ListNotificationWorkflow” from web template “Bhawana: and activate the feature. It should look like below:
If the feature got activated successfully then, you can see the workflow will be attached to the list properly. I can go to the list and can find it properly like below:
You can also open the site in designer and you can see it properly like below:
The workflow will also work as expected.
Error while activating feature
But sometimes while activating feature you might get an error like below:
Sorry, something went wrong.
Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following error:
Failed to create a ‘ListId’ from the text: ‘$ListId:Lists/ListName’: HTTP headers received from the server – ActiviyId:’GUID’……………. —-> System.Net.WebException: The remote server returned an error (400) Bad Request. at Microsoft.Workflow.Common.AsyncResult.End… It looks like below:
(Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following error):
The above error will come if the list is not available, or the list title and URL are not the same as your source site. In the above case, the list URL was different. In my source site the list URL contains a space but in the destination site, space was not there. That was creating the issue.
To resolve the above issue follow the below step:
- Correct the List URL/Title exactly same as your source site.
- Then Deactivate and Delete the existing solution from the Solution gallery (Site Settings page)
- Then open the SharePoint site using SharePoint designer, go to the Workflow tab and delete the workflow from a designer.
- Then re-upload the solution, activate the solution and then activate the feature. Then it will work fine. Deleting the workflow from SharePoint designer 2013 is also very important
Read SharePoint 2013 designer workflow tutorials:
- SharePoint Online Site Workflow and Initiation Form Parameters example using SharePoint designer workflow
- Delete list item after specific duration using SharePoint designer workflow
- How to add edit task form URL inside SharePoint 2013 designer workflow email?
- How to Trigger Sharepoint 2013 Designer workflow on a list item by calling REST API using jQuery?
- SharePoint designer workflow examples: Steps to create a Leave Request SharePoint designer workflow in SharePoint Online
- SharePoint designer workflows and create a workflow using SharePoint designer 2013
- SharePoint Online Create Workflow History List using PowerShell or using SharePoint Designer 2013
I hope this tutorial helps us to learn how to deploy SharePoint designer workflow into production. It should fix the below queries:
- How to deploy sharepoint designer workflow into production
- SharePoint 2013 copy workflow to another list
- How to move list workflow of SharePoint 2013
- How we can copy SharePoint designer 2013 workflow from one site collection to another site collection in SharePoint online.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com