SharePoint workflow manager 2019/2016/2013

Note: The screenshots I have taken to install and configure SharePoint workflow manager are from a SharePoint 2016 environment. You can follow exactly the same steps to install and configure SharePoint workflow manager 2019. There is no difference in both environments.

But make sure, you have followed the SharePoint 2019 installation requirements.

So let us start.

We will also check how to download and install Workflow manager 1.0 for SharePoint 2016. Then we will configure the workflow manager for SharePoint 2016 in the windows server 2012 R2 machine.

SharePoint workflow manager download and installation

There is no difference between installing the workflow manager 1.0 in SharePoint 2013 and SharePoint 2016. Because in SharePoint 2016 there is no new version of SharePoint designer, you can use SharePoint 2013 designer to work with SharePoint 2016.

We can use SharePoint designer 2013 to customize SharePoint sites, Workflow development, etc.

After installing SharePoint 2016, if you open SharePoint designer and try to create a workflow then you can see only the SharePoint 2010 Workflow Platform Type as shown in the fig below:

sharepoint workflow manager
sharepoint workflow manager

Download and Install Workflow Manager SharePoint 2016

Follow below steps to install workflow manager in SharePoint 2016:

Once you click on I Accept button as shown in the fig below:

sharepoint workflow manager 2019
workflow manager SharePoint 2016/2019

Then it will install various components like below:

configure workflow manager sharepoint
configure workflow manager SharePoint

Once the installation (Workflow Manager 1.0) over then it will ask to configure Workflow manager.

Click on the Continue button to configure the workflow manager.

sharepoint workflow manager download
sharepoint workflow manager download

Configure Workflow Manager SharePoint 2016

Then in the workflow manager configuration wizard, click on Configure Workflow Manager with Default Settings (Recommended) as shown in the fig below:

sharepoint 2016 workflow manager download
sharepoint 2016 workflow manager download

Then in the New Farm Configuration wizard, then it will auto-populate SQL Server Instance and then Configure Service Account. Give password. And then Allow Workflow management over HTTP on this computer. And Enable firewall rules on this computer. Sin the Certificate Generation Key, put a key as shown in the fig below:

sharepoint 2019 workflow manager download
configure workflow manager sharepoint 2016 step by step

Then it will display Summary as shown in the fig below. Then click on the right button as shown in the fig below:

configure workflow manager sharepoint 2013
configure workflow manager SharePoint 2013

It will display Configuration progress as shown in the fig below:

sharepoint 2019 workflow manager
Install and configure workflow for SharePoint Server 2013

Once the configuration progress completes, then it will display in a wizard-like below:

workflow manager sharepoint 2016
install workflow manager sharepoint 2019

Register Workflow Service to SharePoint 2016 Site Collection

Then we need to use PowerShell to Register workflow service to the site collection. Below is the PowerShell command.

Register-SPWorkflowService -SPSite "http://mypc/sites/MySP2016SiteCollection/" -WorkflowHostUri "http://localhost:12291" -AllowOAuthHttp -Force

When you run this command if you got the below error as:

Register-SPWorkflowService: Workflow XAML failed validation due to the following error:
Invalid type(s) ‘Microsoft.Activities.CacheScope’…

workflow manager 1.0
install workflow manager sharepoint 2016

You can follow the below solution to fix the issue, Register-SPWorkflowService Workflow XAML failed validation due to the following errors, the complete error look below:

Register-SPWorkflowService -SPSite “http://mypc/sites/MySP2016SiteCollection/” -WorkflowHostUri “http://localhost:12291” -AllowOAuthHttp -Force

After running the above PowerShell command, the error comes as:

Register-SPWorkflowService: Workflow XAML failed validation due to the
following errors:
Invalid type(s) ‘Microsoft.Activities.CacheScope’.
HTTP headers received from the server – ActivityId:
07a06348-b8bd-4a9c-b6d6-cd3ce7ba7685. NodeId: MYPC. Scope: /SharePoint. Client
ActivityId : caa7829d-b770-b073-3e38-2ef805a24d76.
At line:1 char:1
+ Register-SPWorkflowService -SPSite
“http://mypc/sites/MySP2016SiteCollection/” – …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidData: (Microsoft.Share…WorkflowService:
RegisterSPWorkflowService) [Register-SPWorkflowService], ActivityValidatio
nException
+ FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell
.RegisterSPWorkflowService

See the fig for more about the error:

Register-SPWorkflowService Workflow XAML failed validation
Register-SPWorkflowService Workflow XAML failed validation

Register-SPWorkflowService Workflow XAML failed validation

Below is the solution to resolve Register-SPWorkflowService Workflow XAML failed validation error.

Then I restarted my machine and run the above PowerShell command. This is not a mandatory step, but if without restarting it did not work then restart the machine once and try, it should work fine.

This is how to solve Register-SPWorkflowService Workflow XAML failed validation error in SharePoint 2013/2016/2019.

After resolving this issue, run the above command, and then it will register the workflow service successfully.

Then to verify if the workflow is successfully registered, Open SharePoint 2013 central administration and then click on Manage service applications which is under Application Management as shown in the fig below:

how to install workflow manager SharePoint 2016 step by step
install workflow manager sharepoint 2016

Once it will register successfully, open SharePoint designer and then you can be able to see the SharePoint 2013 platform type as shown in the fig below:

install and configure workflow manager in sharepoint 2016
install workflow manager sharepoint 2016

This is how to install workflow manager sharepoint 2016.

This computer is part of a farm error while uninstalling workflow manager 1.0 in SharePoint 2016/2013

Let us see, how to solve error This computer is part of a farm. To uninstall, first, leave the farm either using Leave from farm option in Configuration Wizard or Remove-WFHost cmd-let in PowerShell. The error comes while uninstalling workflow manager in SharePoint 2016/2013.

When I am trying to uninstall workflow manager 1.0, it shows an error message like “This computer is part of the farm. To Uninstall, first, leave the farm either using ‘Leave from Farm’ option in the Configuration Wizard or Remove-WFHost cmd-let in PowerShell.

When I clicked on uninstall, it will show error message like as I shown below.

This computer is part of a farm error while uninstalling workflow manager 1.0
This computer is part of a farm error while uninstalling workflow manager 1.0

See the error here.

uninstall workflow manager sharepoint 2013
uninstall workflow manager sharepoint 2013

For removing the ‘Leave from farm’, open window PowerShell as administrator and type this command:

PS G:\Users\Administrator> Remove-WFHost

Next press enter then the component is removed. Enter a command as shown below.

uninstall workflow manager sharepoint 2013
uninstall workflow manager sharepoint 2013

After completing in Windows PowerShell, coming back to uninstalling the workflow manager 1.0 control-panel -> program and feature, here click on Uninstall a program.

workflow manager 1.0
This computer is part of a farm SharePoint workflow manager 1.0

Now right click on workflow manager 1.0, click on Uninstall then it will be uninstalled successfully without giving an error.

The Option for the SharePoint 2013 Workflow Platform is not available

After I installed SharePoint Designer 2013 and tried to create SharePoint 2013 workflow but there was no option to select platform type as “SharePoint 2013 Workflow” and getting the following message in SharePoint Designer 2013: The Option for the SharePoint 2013 Workflow Platform is not available because the Workflow service is not configured on the server.

Test

The Option for the SharePoint 2013 Workflow Platform is not available
The Option for the SharePoint 2013 Workflow Platform is not available error in SharePoint 2013

Here are the steps:

1. Make sure Workflow Manager 1.0 for SharePoint 2013 server is installed and configured properly.

  • Download and install the workflow individual components from this URL.

2. Verify that all the following services are running: (To check service status, Press Windows key+R and type services.msc)

  • Workflow Manager Backend
  • Windows Fabric Host Service
  • Service Bus Gateway

3. Open “Sharepoint 2013 Management Shell” and run following command:

Enable-SPFeature -Identity WorkflowServiceStore –Url $yourUrl

Here replace $yourUrl with your site collection URL. In my case, I was getting a message the feature was already activated at that site.

4. Open IIS, Verify “Workflow Management Site” is working fine. You can determine which ports SharePoint Server 2013 and Workflow Manager are using for both HTTP and HTTPS by using IIS Manager as shown in the figure.

The Option for the SharePoint 2013 Workflow Platform is not available error in SharePoint 2013
The Option for the SharePoint 2013 Workflow Platform is not available

5. You need to register the workflow service with an existing site collection by using the following Register-SPWorkflowService cmdlet. Execute it in the SharePoint 2013 Management Shell. Please ensure you use the following syntax:

Register-SPWorkflowService –SPSite “http://svr7007/” –WorkflowHostUri “https://svr7007:12290? –AllowOAuthHttp

Change port number if you want use HTTP(12291) or HTTPS(12290) to communicate between Workflow Manager and SharePoint Server 2013.

6. Finally, open SharePoint Designer 2013 and check you can create SharePoint 2013 workflows

The Option for the SharePoint 2013 Workflow Platform is not available
The Option for the SharePoint 2013 Workflow Platform is not available

This way we can resolve an issue The Option for the SharePoint 2013 Workflow Platform is not available error in SharePoint 2013/2016/Online.

Register SPWorkflowService Failed to query the OAuth S2S metadata endpoint at URI

If you get the below error, while trying to configure workflow manager for SharePoint 2016:
Register-SPWorkflowService: Failed to query the OAuth S2S metadata endpoint at URI “http://SiteCollectionURL”.
Error Details: The metadata endpoint responded with an error. HTTP status code: Forbidden…..

Actually, the error came when I try to register the workflow service to the site collection by using the below PowerShell command:

Register-SPWorkflowService -SPSite "http://SiteCollectionURL" -WorkflowHostUri "http://localhost:12291" -AllowOAuthHttp -Force

The error looks like below:

Register SPWorkflowService Failed to query the OAuth S2S metadata endpoint at URI
Register SPWorkflowService Failed to query the OAuth S2S metadata endpoint at URI

Register SPWorkflowService Failed to query the OAuth S2S metadata endpoint at URI

I checked in the HOST file where I found that one extra entry like below presented for some reason:

127.0.0.1

You can find the HOST file in the below etc folder:

C:\Windows\System32\Drivers\etc

Once I remove the entry and then I rerun the PowerShell command the error did not come and it successfully registered.

This is how to resolve the issue Register SPWorkflowService Failed to query the OAuth S2S metadata endpoint at URI error while configuring workflow manager in SharePoint.

register-spworkflowservice the underlying connection was closed

Let us see how to resolve “register-spworkflowservice the underlying connection was closed” which comes while configuring the workflow manager in SharePoint 2013/2016/2019.

The error comes when I run the Register-SPWorkflowService command in SharePoint 2013 management shell.

Register-SPWorkflowService -SPSite "http://win-pfcp2dgt8di/sites/EnjoySharePoint/" -WorkflowHostUri "http://WIN-PFCP2DGT8DI.enjoysharepoint.org:12290" -AllowOAuthHttp

The error comes like below:

register-spworkflowservice the underlying connection was closed
register-spworkflowservice the underlying connection was closed

register-spworkflowservice the underlying connection was closed

The problem was with the port number, I was giving here 12290. When I changed to 12291 it works for me.

For https, the port was set to 12290 and for http the port was set to 12291.

My site is configured to http. So I changed the command like below:

Register-SPWorkflowService -SPSite "http://win-pfcp2dgt8di/sites/EnjoySharePoint/" -WorkflowHostUri "http://WIN-PFCP2DGT8DI.enjoysharepoint.org:12291" -AllowOAuthHttp

If you want to check you open your IIS (Internet Information Services), Manager. Then select the Workflow Management Site from the site and you will be able to see your protocols in the Browse Website section like below:

register-spworkflowservice the underlying connection was closed
register-spworkflowservice the underlying connection was closed

This is how to fix register-spworkflowservice the underlying connection was closed error which comes while configuring workflow manager in SharePoint 2013/2016/2019.

SharePoint 2013: Logs for Analyzing or troubleshooting the issues related to workflows or Workflow Manager

If you get any errors while publishing SharePoint Designer workflows (or) trying to access the workflow management site from IIS (or) while starting any workflow throws an error, we can troubleshoot the issue by checking any exception in the ULS Logs.

And we can check in Event viewer, where the workflow-related issues are logged in the SharePoint server.

Check SharePoint workflow errors in Event Viewer

Go to Event Viewer (Window +R, then type eventvwr in the run box)

Go to Applications and Services Log.

Go to Microsoft-workflow.

Check SharePoint workflow errors in Event Viewer
Check SharePoint workflow errors in Event Viewer

Click -> Operation, which will list issues related to Workflow management Service.

SharePoint 2013 Logs for Analyzing or troubleshooting workflow issues
SharePoint 2013 Logs for Analyzing or troubleshooting workflow issues

If you did not have any relevant issues logged, right-click in the event window and select View->Show Analytic & debug logs.

sharepoint 2013 workflow debugging
sharepoint 2013 workflow debugging
sharepoint 2013 workflow debugging
sharepoint 2013 workflow debugging

This is how to get Logs for Analyzing or troubleshooting the issues related to workflows or Workflow Manager in SharePoint 2013.

You may like the following SharePoint workflow tutorials:

I hope this will be helpful to install and configure the workflow manager in SharePoint 2016, SharePoint 2013 or SharePoint 2019.

>