There are already a ton of posts out there where a SharePoint 2013 workflow becomes stuck at started or starting.  Well I have another one.  This problem actually originated in a SharePoint 2013 farm.  If you are using SharePoint Online, the cause is actually pretty easy to determine.  So for those of you not lucky enough to be working with SharePoint Online, I will go through the symptoms you could come across and a possible resolution.

SharePoint Workflow Stuck at Starting or Started

Let’s start with the workflow.  It’s a really basic workflow.  It writes to the log, sets a choice field and then assigns a task.  Depending on the results it then updates the same choice field accordingly, updates the log and completes the workflow.  Here’s the workflow I created:

SharePoint Workflow Stuck at Starting or Started - Simple Workflow

So in a default library this workflow functions just fine (a bit of foreshadowing I know).

SharePoint Workflow Stuck at Starting or Started - Workflow started

A task is generated as expected:

SharePoint Workflow Stuck at Starting or Started - Task Approval

And the approval functions as expected:

SharePoint Workflow Stuck at Starting or Started - Workflow Completed

So the problem occurred when we changed the default settings and had a library with check out required enabled.  When this happens,, the workflow will not fail.  It will just sit.  In our 2013 farm we received the following cryptic error:

 

SharePoint Workflow Stuck at Starting or Started - SharePoint 2013 Workflow Error

Remember how I mentioned that if you are running SharePoint Online it makes it easier?  Here’s why:

SharePoint Workflow Stuck at Starting or Started - SharePoint Online Error

So as you can see, the Workflow can’t do anything because it can’t set the value since it is not checked out.  You don’t get that information in older versions of SharePoint so hence this post.

The Solution

There are actually two possible solutions:

  1. Remove the checkout required from the library.  However this isn’t the best solution because there is likely business reasons why you needed it enabled in the first place.
  2. Add a step in the workflow to check out the document before you do anything and in the final step (no matter the outcome of the workflow) check it back in.

So you’re modified workflow will look like this:

SharePoint Workflow Stuck at Starting or Started - Updated Workflow

This will allow you to accomplish the updates needed to your list item without having to change the library\list settings.

 

Thanks for reading!!