Packaging And Deploying In SharePoint 2013 Designer Workflow
Introduction
SharePoint Designer 2013 provides the capability to save a workflow as a template. Saving a workflow as a template is also known as packaging the workflow. This capability is absent in Sharepoint 2010 List Workflow. In this article, we will explore all the steps regarding Packaging, Deploying and Workflow registration. In Sharepoint 2010/2013, not all workflow types can be saved as template. The following table shows the workflow types that can be saved as template.
Workflow type | SharePoint 2010 Workflow platform | SharePoint 2013 Workflow platform |
List Workflow | No | Yes |
Site Workflow | No | Yes |
Reusable Workflow | Yes | Yes |
Scenario
You've created a SP Designer Workflow in one (test) environment and want to deploy onto another (Production) environment. Follow the below steps to move the workflow to other (production) environment site:
Create Solution - Package a workflow by using SharePoint Designer 2013
In order to use this workflow on another Server, we have to save this workflow as a SharePoint Solution package (.wsp file), and then deploy it as a solution on the other server (Production).
To package a workflow, follow these steps:
Open site in SharePoint Designer 2013.
On the "Workflow Settings" tab in the ribbon, click the "Save as Template" button in the "Manage" section, as shown in the figure.
The .wsp file is now located in the Site Asset library in the Site Collection on your Test Server.
Go to Site Content => Site Assets and we will find Exception Approval .wsp file.
Download a copy of this file to any directory on our computer.
Deploy a SharePoint solution package
Open Internet Explorer and navigate to the site collection we want to deploy the workflow in.
Copy the .wsp file from our computer to a local directory on our Production Server.
Click "Site Actions" and select "Site Settings".
In the Web Design Galleries section, click Solutions.
Click the "Upload Solution" button to upload the .wsp solution, as shown in the figure.
https://csharpcorner-mindcrackerinc.netdna-ssl.com/article/packaging-and-deploying-in-sharepoint-2013-designer-workflow/Images/Uplode.jpg
Figure - Upload Solution buttonActivate the solution by clicking "Activate".
https://csharpcorner-mindcrackerinc.netdna-ssl.com/article/packaging-and-deploying-in-sharepoint-2013-designer-workflow/Images/image003.png
Figure - Activate Solution dialog and button
After a workflow solution has been activated for a site collection, just follow this procedure.
Activate the workflow feature
Open "Site Settings" on the site where we wish to activate the workflow feature.
In the "Site Actions" group, click "Manage site features".
Click "Activate" next to the workflow feature, as shown in the figure.
https://csharpcorner-mindcrackerinc.netdna-ssl.com/article/packaging-and-deploying-in-sharepoint-2013-designer-workflow/Images/image004.jpg
Figure - Activate workflow feature for site
Note
In workflow, if we are using an app, then we must Register workflow App permission after deployment.