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 typeSharePoint 2010 Workflow platformSharePoint 2013 Workflow platform
List WorkflowNoYes
Site WorkflowNoYes
Reusable WorkflowYesYes

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, you 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:

  1. Open site in SharePoint Designer 2013.
  2. On the "Workflow Settings" tab in the ribbon, click the "Save as Template" button in the "Manage" section, as shown in the figure.

    SharePoint

  3. The .wsp file is now located in the Site Asset library in the Site Collection on your Test Server.
  4. Go to Site Content => Site Assets and you will find Exception Approval .wsp file.
  5. Download a copy of this file to any directory on your computer.

Deploy a SharePoint solution package

  1. Open Internet Explorer and navigate to the site collection you want to deploy the workflow in.
  2. Copy the .wsp file from your computer to a local directory on your Production Server.
  3. Click "Site Actions" and select "Site Settings".
  4. In the Web Design Galleries section, click Solutions.
  5. Click the "Upload Solution" button to upload the .wsp solution, as shown in the figure.


    Figure - Upload Solution button

  6. Activate the solution by clicking "Activate".

    SharePoint
    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
  1. Open "Site Settings" on the site where you wish to activate the workflow feature.
  2. In the "Site Actions" group, click "Manage site features".
  3. Click "Activate" next to the workflow feature, as shown in the figure.

    SharePoint
    Figure - Activate workflow feature for site

Note

In workflow, if you are using an app, then you must Register workflow App permission after deployment.