Posts Tagged ‘Workflow Manager’

HOWTO Fix SharePoint 2013 and Workflow Manager Configuration

August 14, 2015

The configuration and integration between SharePoint 2013 and Workflow Manager is hard. Really hard – when it doesn’t work straight away. Workflow Manager is a stand-alone product, integration between SharePoint and WM is all done via PowerShell, diagnosing issues between WM and SharePoint is problematic, and there doesn’t seem to be a concrete method to guarantee it will work. Many articles say “just rebuild your SP farm and/or Workflow farm”. Ouch.

Let’s work backwards to solve the problem. SharePoint Designer 2013 is looking for two configuration items to be completed before it will let you create SharePoint 2013 workflows.

  1. The Workflow service proxy is configured and working (via Central Admin)
  2. The Workflow Service feature is configured and working (via PowerShell)

Both of these components must be enabled and functioning in order to tick the boxes in SharePoint Designer 2013. If either fails, SharePoint Designer will not allow you to create SharePoint 2013 workflows.

The Workflow service proxy (1) connects to the Workflow services system. The Workflow Service feature (2) is a SharePoint feature that must be enabled and configured via SharePoint Powershell for the site collection. Lets got through all the components.

Checking Workflow Manager Service Configuration

Use the following Workflow Powershell commands to view the server configuration:

Get-WFFarm | format-list

This should return the following:

RunAsAccount      : <hostname>
AdminGroup      : <hostname>
HttpPort      :    12290
HttpsPort    :    12291

Endpoints   : <https://my.workflow.url:12290&gt;

You should be able to use your browser to access the Endpoint and return an Xml configuration page.
To get the Farm status use:

Get-WFFarmStatus | format-list

This should return the following:

HostName      : <hostname>
ServiceName   : WorkflowServiceBackend
ServiceStatus : Running

HostName      : <hostname>
ServiceName   : WorkflowServiceFrontEnd
ServiceStatus : Running

The ServiceStatus “Running” is the important part here.

Checking SharePoint 2013 Workflow Service Configuration

Use the following SharePoint 2013 powershell commands to view Workflow Service configuration:

Get-SPWorkflowConfig -SiteCollection [sitecollectionurl]

Get-SPWorkflowServiceApplicationProxy | format-list

Validate that the Endpoints are correct, and you can indeed navigation to them.

Checking SharePoint 2013 Workflow Proxy Application

The workflow proxy application is available through the Central Admin, Manage Service Applications interface. Clicking on the Workflow service application should show you the following:

Workflow - Service Application Proxy Status

Fixing SharePoint 2013 Workflow Service Feature

The following SharePoint Powershell command forces the Workflow Service feature to be enabled:

Enable-SPFeature -Identify WorkflowServiceStore -url <site collection url> -Force

I received this error when I didn’t use the -Force parameter:

Enable-SPFeature: The field with id {GUID} defined in feature {GUID} was found in the current site collection or in a subsite.

SharePoint 2013 CU2 Upgrade Issues with Workflow Manager

During a recent upgrade of our SharePoint farm I noted the following warning in the upgrade log file:

WARNING Error UpgradeWorkflowServiceActivities.  
Run Copy-SPLocalActivitiesToWorkflowService manually to complete this action.  
Error: Microsoft.Workflow.Client.WorkflowEndpointNotFoundException: Unable to connect to the remote 
service at http://<servername>:12291/SharePoint/. See InnerException for more details.

It turned out that during the upgrade the IIS service was offline, so the workflow management endpoint was also offline. There doesn’t actually seem to be a Copy-SPLocalActivitiesToWorkflowService powershell command, but there is a Copy-SPActivitiesToWorkflowService. I ran that command with the following details (i’m using HTTP in my test environment):

$cred=[System.Net.CredentialCache]::DefaultNetworkCredentials
Copy-SPActivitiesToWorkflowService -WorkflowServiceAddress "http://<servername>:12291/SharePoint" -Credential $cred -Force $true

Addendum: Workflow Manager and Service Bus CU2

Service Bus 1.0 Cumulative Update 2 (CU2)

Workflow Manager 1.0 Cumulative Update 2 (CU2)