Install and configure workflow for SharePoint Server

APPLIES TO: yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

This article contains the information and procedures required to configure SharePoint Workflow Manager (SPWFM) for SharePoint Server.

Note

There are two separate workflow engine products that power the SharePoint 2013 Workflow platform: Microsoft Workflow Manager ("Classic WFM") and SharePoint Workflow Manager (SPWFM). Microsoft Workflow Manager is no longer available to be installed, whereas SharePoint Workflow Manager has been released to replace it. Hence, the instructions outlined in this document explain how to install SharePoint Workflow Manager.

Important

The steps in this article apply to SharePoint Server. The SharePoint 2013 Workflow platform is not supported in SharePoint Foundation 2013.

Note

You can watch a video series that walks through the process of installing and configuring the SharePoint 2013 Workflow platform. To view the videos, see Video series: Install and configure Workflow in SharePoint Server 2013.

Learn about Workflows for SharePoint in Microsoft 365.

Overview

A new option exists when you build a workflow for SharePoint Server. This option is called Platform Type. The figure shows the Platform Type option when you're creating a new workflow by using SharePoint Designer 2013.

Figure: SharePoint Server includes three workflow platform options.

Three workflow platforms in SharePoint 2013.

The only platform available when you first install SharePoint Server is the SharePoint 2010 Workflow platform. The SharePoint 2013 Workflow platform and the Project Server platform require more steps. The three workflow platforms are outlined in the following table.

Workflow Platform types available in SharePoint Server

Platform Type Platform Framework Requirements
SharePoint 2010 Workflow
Windows Workflow Foundation 3
Installs automatically with SharePoint Server.
SharePoint 2013 Workflow
Windows Workflow Foundation 4
Requires SharePoint Workflow Manager or Microsoft Workflow Manager, and SharePoint Server.
SharePoint 2013 Workflow - Project Server
Windows Workflow Foundation 4
Requires SharePoint Workflow Manager or Microsoft Workflow Manager, and Project server.

Note

SharePoint Workflow Manager must be downloaded and installed separately from SharePoint Server. It does not install automatically when you install SharePoint Server.

New installation of SharePoint Workflow Manager

SharePoint Workflow Manager may be installed on the same servers as SharePoint or on separate, dedicated servers. It's recommended that SharePoint Workflow Manager is installed on its own dedicated servers for performance and reliability reasons.

Note

SharePoint Workflow Manager is supported in farms having an odd number of hosts, for example, 1, 3, or 5. A farm with 2 or 4 SharePoint Workflow Manager hosts is not supported.

Prerequisites

SharePoint Workflow Manager requires the server role of Web Server (IIS). If you're installing SharePoint Workflow Manager on a server without the IIS server role installed, the Workflow Manager Configuration Wizard fails with messages like Could not load file or assembly 'Microsoft.Web.Administration'. Apart from the features that are installed by default, the SharePoint Workflow Manager work requires the following IIS features:

  • Windows Authentication (under Security)
  • .NET Extensibility 4.7 (under Application Development)
  • ASP.NET 4.7 (under Application Development)

SharePoint Workflow Manager might not be installed and configured correctly with only RODC (read-only domain controller) provided in the network environment as it requires RWDC (read/write DC, full DC).

SharePoint Workflow Manager requires Azure Service Fabric, which must be installed before you run SharePoint Workflow Manager setup. If the Azure Service Fabric Runtime isn't already installed, follow these steps below to install it:

  1. The minimum version of Azure Service Fabric Runtime supported by SharePoint Workflow Manager is 9.1.1583.9590, and you can download it from Azure Service Fabric Runtime. Or you can find and download any higher version of its Windows Installer from here.

  2. Open a PowerShell console as an elevated administrator and run the following command:

    .\MicrosoftServiceFabric.9.1.1583.9590.exe /accepteula

  3. To verify the Azure Service Fabric is installed, you should be able to find it in the Programs and Features of the Control Panel.

Note

SharePoint Workflow Manager supports the version 9.1 CU2 (9.1.1583.9590) of Azure Service Fabric and higher versions. If Windows Fabric is already installed on your machine, you must uninstall it before installing Azure Service Fabric.

It’s been reported that Azure Service Fabric might generate a large amount of logs squeezing the disk space regardless of the SharePoint Workflow Manager workload, and you can identify it under the %ProgramData%\Microsoft Service Fabric\Log\Traces. But you can't control the log size through the cluster configuration, with only Azure Service Fabric Runtime installed. You might need to delete expired logs manually, or for example, create a periodic task through the Windows Task Scheduler to do it.

Install SharePoint Workflow Manager

SharePoint Workflow Manager and SharePoint Workflow Manager Client can be downloaded from here. The system requirements can be found on that page as well.

Install both SharePoint Workflow Manager and SharePoint Workflow Manager Client on all servers in the Workflow Manager farm. Install only the SharePoint Workflow Manager Client on all servers in the SharePoint Server farm.

Note

Though it is supported to install SharePoint Workflow Manager on servers running SharePoint Server, it is recommended that SharePoint Workflow Manager is installed on its own dedicated servers for performance and reliability reasons.

Configure SharePoint Workflow Manager farm

To create a SharePoint Workflow Manager farm and join your servers to the farm, you can configure SharePoint Workflow Manager through the Workflow Manager Configuration Wizard, see Video series Install and configure Workflow.

Note

The SharePoint 2010 Workflow platform installs automatically when you install SharePoint Server. The SharePoint 2013 Workflow platform requires either Microsoft Workflow Manager ("Classic WFM") or SharePoint Workflow Manager (SPWFM) and must be installed separately and then configured to work with your SharePoint Server farm. To function correctly, SharePoint 2013 Workflows require that the App Management Service and Site Subscription Service are provisioned. It is not required to set up a wildcard certificate and DNS registration but both instances need to be running.

Configure SharePoint Workflow Manager to work with the SharePoint Server farm

Consider the following two key factors before configuring SharePoint Workflow Manager to work with SharePoint Server.

  • Is SharePoint Workflow Manager installed on a server that is part of the SharePoint farm?

  • Will communication between SharePoint Workflow Manager and SharePoint Server use HTTP or HTTPS ?

These factors translate into four scenarios. Each scenario configures a SharePoint Server farm to communicate and function with the SharePoint Workflow Manager farm. Follow the scenario that matches your circumstance.

Scenario Number and Description Scenario Number and Description
1: SharePoint Workflow Manager is installed on a server that is part of the SharePoint Server farm. Communication takes place by using HTTP.
2: SharePoint Workflow Manager is installed on a server that is part of the SharePoint Server farm. Communication takes place by using HTTPS.
3: SharePoint Workflow Manager is installed on a server that is NOT part of the SharePoint Server farm. Communication takes place by using HTTP.
4: SharePoint Workflow Manager is installed on a server that is NOT part of the SharePoint Server farm. Communication takes place by using HTTPS.

Note

For security reasons, we recommend HTTPS for a production environment.

To configure SharePoint Workflow Manager on a server that is part of the SharePoint Server farm and on which communication takes place by using HTTP

  1. Sign-in to the computer in the SharePoint Server farm where SharePoint Workflow Manager was installed.

  2. Open the SharePoint Management Shell as an administrator by right-clicking the SharePoint Management Shell and choosing Run as administrator.

  3. Run the Register-SPWorkflowService cmdlet.

    Example:

    Register-SPWorkflowService -SPSite "http://myserver/mysitecollection" -WorkflowHostUri "http://workflow.example.com:12291" -AllowOAuthHttp
    
  4. Sign-in to each server in the SharePoint Server farm.

    Each server in the SharePoint Server farm must have the Workflow Manager Client installed.

    Note

    SharePoint Workflow Manager servers need both the SharePoint Workflow Manager and the SharePoint Workflow Manager client software installed. SharePoint servers only need the client installed.

  5. Install the SharePoint Workflow Manager Client on each server in the SharePoint farm.

To configure SharePoint Workflow Manager on a server that is part of the SharePoint Server farm and on which communication takes place by using HTTPS

  1. Determine if you need to install SharePoint Workflow Manager certificates in SharePoint.

    Under some circumstances, you have to obtain and install SharePoint Workflow Manager certificates. If your installation requires that you obtain and install these certificates, you must complete that step before continuing. To learn whether you need to install certificates, and for instructions, see Install Workflow Manager certificates in SharePoint Server.

  2. Sign-in to the computer in the SharePoint Server farm where SharePoint Workflow Manager was installed.

  3. Open the SharePoint Management Shell as an administrator by right-clicking the SharePoint Management Shell and choosing Run as administrator.

  4. Run the Register-SPWorkflowService cmdlet.

    Example:

    Register-SPWorkflowService -SPSite "https://myserver/mysitecollection" -WorkflowHostUri "https://workflow.example.com:12290"
    
  5. Sign-in to each server in the SharePoint Server farm.

    Each server in the SharePoint Server farm must have the Workflow Manager Client installed.

    Note

    SharePoint Workflow Manager servers need both the SharePoint Workflow Manager and the SharePoint Workflow Manager client software installed. SharePoint servers only need the client installed.

  6. Install the SharePoint Workflow Manager Client on each server in the SharePoint farm.

To configure SharePoint Workflow Manager on a server that is NOT part of the SharePoint Server farm and on which communication takes place by using HTTP

  1. Sign-in to each server in the SharePoint Server farm.

  2. Install the SharePoint Workflow Manager Client on each server in the SharePoint farm.

    Before you can run the workflow pairing cmdlet, you must install SharePoint Workflow Manager Client on each of the servers in the SharePoint farm.

  3. Open the SharePoint Management Shell as an administrator by right-clicking the SharePoint Management Shell command and choosing Run as administrator.

  4. Run the Register-SPWorkflowService cmdlet. The cmdlet should be run only once and can be run from any of the servers in the SharePoint farm.

    Example:

    Register-SPWorkflowService -SPSite "http://myserver/mysitecollection" -WorkflowHostUri "http://workflow.example.com:12291" -AllowOAuthHttp
    

Important

You must install the SharePoint Workflow Manager Client on each server in the SharePoint farm before you run the pairing cmdlet.

To configure SharePoint Workflow Manager on a server that is NOT part of the SharePoint Server farm and on which communication takes place by using HTTPS

  1. Determine whether you need to install SharePoint Workflow Manager certificates in SharePoint Server.

    Under some circumstances, you have to obtain and install SharePoint Workflow Manager certificates. If your installation requires that you obtain and install these certificates, you must complete that step before continuing. To learn whether you need to install certificates, and for instructions, see Install Workflow Manager certificates in SharePoint Server.

  2. Sign-in to each server in the SharePoint Server farm.

  3. Install the SharePoint Workflow Manager Client on each server in the SharePoint farm.

    Before you can run the workflow pairing cmdlet, you must install SharePoint Workflow Manager Client on each of the servers in the SharePoint farm.

  4. Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint Management Shell command and choosing Run as administrator.

  5. Run the Register-SPWorkflowService cmdlet.

    Example:

    Register-SPWorkflowService -SPSite "https://myserver/mysitecollection" -WorkflowHostUri "https://workflow.example.com:12290"
    

Important

You must install the SharePoint Workflow Manager Client on each server in the SharePoint farm before you run the pairing cmdlet.

Upgrade existing Microsoft Workflow Manager

In order to update Microsoft Workflow Manager (Classic WFM) to SharePoint Workflow Manager (SPWFM), SharePoint Workflow Manager can't be placed on top of Microsoft Workflow Manager. Installing this build requires first uninstalling any prior versions of Workflow Manager, Workflow Manager Client, and Service Bus.

You can upgrade to SharePoint Workflow Manager from any version of Microsoft Workflow Manager.

Follow the steps below to uninstall Microsoft Workflow Manager and install SharePoint Workflow Manager:

  1. Open Workflow Manager Configuration Wizard.

  2. Select Leave Workflow Manager Farm.

  3. Confirm the subsequent steps until the end.

    Note

    Each database used by Workflow Manager and Service Bus will need to be specified when rejoining the farm with SharePoint Workflow Manager. For example, the SQL Server instance and database name for the Workflow Manager farm management database and the Service Bus farm management database.

  4. Uninstall Microsoft Workflow Manager, Workflow Manager Client, Service Bus for Windows Server, and Windows Fabric if they're installed. You can uninstall them from the Control Panel. If Windows Fabric is installed, ensure you install Azure Service Fabric after uninstalling Windows Fabric.

  5. If the folder %ProgramFiles%\Workflow Manager\1.0 already exists, you must manually remove it for the next steps to succeed.

  6. Install SharePoint Workflow Manager and SharePoint Workflow Manager Client.

  7. If there's more than one server in your Workflow Manager farm, repeat the previous steps on all farm servers.

  8. Run the Workflow Manager Configuration Wizard and rejoin the previous farm with the databases you noted in the previous steps on all servers in your Workflow Manager farm.

    Note

    There is no need to delete the existing Workflow Service Application Proxy, and there is no need to re-register SPWorkflowService. If you encounter the invalidity of the Certificate Generation Key for SharePoint Workflow Manager and Service Bus, you may reset it, see Reset Certificate Generation Key.

  9. Rerun the Workflow Manager Configuration Wizard, select Upgrade Workflow Manager Farm, and confirm subsequent steps until the end.

    Note

    This step should be run on all servers in the SharePoint Workflow Manager farm. The "Upgrade Workflow Manager Farm" option is always presented in the Workflow Manager Configuration Wizard, whether an upgrade is required or not. There's no harm in running it multiple times.

  10. Install SharePoint Workflow Management Client on each server in the SharePoint Server farm after uninstalling any previous versions.

Validate the installation

Follow these steps to validate that you have successfully installed and configured the required components.

To validate the installation

  1. Add a user to your SharePoint site, and grant the user Site Designer permissions.
  2. Install SharePoint Designer 2013 and create a workflow based on the SharePoint 2013 Workflow platform. For more information, see Creating a workflow by using SharePoint Designer 2013 and the SharePoint 2013 Workflow platform.
  3. Run this workflow from the SharePoint user interface.

Troubleshooting

For security reasons, the Setup account can't be used to create a workflow based on the SharePoint 2013 Workflow platform. If you try to create a workflow based on the SharePoint 2013 Workflow platform by using SharePoint Designer 2013, you receive a warning that the list of workflow actions don't exist, and the workflow isn't created.

The user who deploys and runs a workflow must be added to the User Profile service. Check the User Profile service application page in Central Administration to confirm that the user you're using to validate workflow installation is in the User Profile service.

You can determine which ports SharePoint Server and Workflow Manager are using for both HTTP and HTTPS by using IIS Manager as shown in the figure.

Figure: Use IIS Manager to view the ports used by SharePoint Workflow Manager

View ports in IIS Manager.

Sharepoint Workflow Manager communicates by using TCP/IP or Named Pipes. Ensure that the appropriate communication protocol is enabled on the SQL Server instance that hosts the SharePoint Workflow Manager databases.

The SQL Browser Service must be running on the SQL Server instance that hosts the Workflow Manager databases.

The System Account can't be used to develop a workflow.

To troubleshoot SharePoint Server, see Troubleshooting SharePoint Server.