Debugging Workflows with Workflow Manager in SharePoint 2013

I'd like to share my experience setting up a Provider-Hosted app for SharePoint 2013 on-premises. It was challenging & required a lot of trial and error.

Two articles I contributed to MSDN have recently been published. They are related to SharePoint 2013 workflow:

  • MSDN: Debugging SharePoint Server 2013 workflows: Microsoft has taken a different approach to workflows in SharePoint Server 2013 than in previous versions of SharePoint. The workflow team worked with the Windows Azure team to create a new product called Workflow Manager. Workflow Manager hosts the latest version of the Windows Workflow Foundation runtime and all the necessary services in an available and scalable way. It takes advantage of the Windows Azure Service Bus for performance and scalability, and when deployed, it runs exactly the same in an on-premises deployment as in the cloud, similar to Office 365. SharePoint 2013 is then connected and configured to hand off all workflow execution and related tasks to the Workflow Manager farm. This change in the architecture required some changes to the two primary workflow authoring tools (SharePoint Designer 2013 and Visual Studio 2012) customers used to create custom workflows. However, the debugging techniques employed by developers in SharePoint 2007 and SharePoint 2010 still apply. The new architecture allows for a new option for workflows created using either SharePoint Designer 2013 or Visual Studio 2012 in that Fiddler can be used to monitor traffic between SharePoint Server 2013 and Workflow Manager.

  • MSDN: Working with the SharePoint 2013 Workflow Services Client Side Object Model: This article touches on one of the things that Microsoft added to SharePoint 2013 to support the new style of creating custom workflow forms: the improvements to the CSOM and addition of the Workflow Services CSOM API.

Slight correct in the first article above… in the article I stated that you cannot use the test service host utility to monitor WriteLine activity messages when debugging your workflow in Office 365. That is still correct with Visual Studio 2012, but in Visual Studio 2013 Microsoft added the ability to monitor the WriteLine messages by using Service Bus as outlined in this blog post: Debugging SharePoint 2013 workflows using Visual Studio 2013 .

Andrew Connell
Developer & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a web & cloud developer with a focus on Microsoft Azure & Microsoft 365. He’s received Microsoft’s MVP award every year since 2005 and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s the founder of Voitanos and is dedicated to helping you be the best Microsoft 365 web & cloud developer. He lives with his wife & two kids in Florida.