Partilhar via


Troubleshooting Actions for SharePoint 2013 Workflows

After delivering the internal Workflow trainings, I have compiled a list of troubleshooting actions for workflow support with SharePoint 2013. The actions below apply to the “new” workflows (workflows living in the Workflow Manager, based on Windows Workflow Foundation 4.0). These actions are not relevant for the “legacy” workflows (SharePoint 2010, using .NET Framework 3.5).

 

Workflow Execution Issues

1. Look in the Workflow History list, eg "https://sp2013/Lists/Workflow History". Do you find any errors in there?

2. Is the user account starting the workflow correctly synchronized in the user profile database?

3. Is the user account starting the workflow different from the Worflow Manager setup account? (more info at https://technet.microsoft.com/en-us/library/jj658588.aspx#section7)

4. Are the User Profile Service and App Management Service started? See the green frames in the screenshot below, taken from Central Administration \ Manage Services on Server: Services Started

5. Are the App Management Service Application and User Profile Service Application started? Their proxies should be started as well. See the green frames in the screenshot below, taken from Central Administration \ Manage Services on Server:

Service Applications Started

 

 

How to Retrieve an Exception in the Workflow Manager Database

    Note that this is unsupported in a production environment, but very useful in a test environment!  

In the SharePoint page workstat.aspx, copy the field requestor id

1. In the URL query parameter from the worsktat.aspx page, copy the instanceid field

2. Open the WFInstanceManagementDB database with SQLManagement Studio, then request from the DebugTrace table

3. The exception is in the WorkflowStatusDetail column

 

 

Is SharePoint 2013 server connected?

    In Central Admin\ Service Applications \ Workflow Service Application Proxy: check the status. Does it read Workflow is Connected as in the below screenshot?  

Workflow Status

 

Is the Worflow Manager farm running?

    On a server member of the Workflow Manager farm:

1. Start Workflow Manager PowerShell

2. Run the get-WFStatus command

3. Are the statuses Running, as on the screenshot below?

Workflow Status PowerShell

 

 

Is the Oauth Metadata information published and accessible from the SharePoint server?

    On the SharePoint 2013 server, start Internet Explorer, and check whether the Oauth metadata is accessible. The url is like https://wfm1:12291/$SYSTEM/$Metadata/json/1 . Below an example:  

OAuth JSon Info

 

 

Are the Scopes registered in the Workflow Manager farm?

It is possible to check from Internet Explorer that the scopes are registered. It is also possible to navigate the workflow data. The example URLs below allow to check these elements:

https://wfm1:12291/$ChildScopes

https://wfm1:12291/SharePoint/default/659f1e87-c228-420e-9eb6-c2ca4b5b7cf8/aa605c44-734b-4bd4-b961-2afd253d1c3d/$ChildScopes

https://wfm1:12291/SharePoint/default/659f1e87-c228-420e-9eb6-c2ca4b5b7cf8/aa605c44-734b-4bd4-b961-2afd253d1c3d/$Workflows

https://wfm1:12291/SharePoint/default/659f1e87-c228-420e-9eb6-c2ca4b5b7cf8/aa605c44-734b-4bd4-b961-2afd253d1c3d/$Workflows/0ce48b29-b821-4785-ab12-34564e7332a3/$Instances

 

Notes

The GUIDs in the above URLs are not static.

The tool below provides an easy navigation in the workflow manager data:

https://code.msdn.microsoft.com/windowsdesktop/Workflow-Resource-Browser-a67b1d27

On a Workflow Manager server, you have to run the Workflow-Resource-Browser as administrator.

 

 

Activate Workflow Manager Logs

  1. 1. Start Event Viewer
  1. 2. Expand Applications and Services Logs \ Microsoft-Workflow
  1. 3. In the menu View \ Show Analytical and Debug logs
  1. 4. Select the Debug log, then right-click enable Log
  2. 5. Reproduce
  3. the issue
  1. 6. Select the Debug log, righ-click Disable Log. (The point is to avoid filling the platform with logs)
  1. 7. It is then possible to save the le log in the EVTX format

 

I hope this checklist will help you while setting up and troubleshooting workflow!

For French readers, the French version of this post is accessible at https://blogs.technet.com/b/french_sharepoint_gbs_blog/archive/2014/01/06/diagnostique-des-workflows-2013.aspx

Comments

  • Anonymous
    June 04, 2014
    How do I find the SharePoint page workstat.aspx?

  • Anonymous
    October 19, 2015
    Typo - "get-WFStatus" should be "Get-WFFarmStatus".  This is correct in the screenshot but wrong in the text.