SharePoint 2013: SharePoint Designer Workflow in Suspended or Canceled State


 

Symptoms

Consider the following scenario:

You publish a SharePoint 2013 Designer Workflow associated with a SharePoint list. A user without edit permission to that SharePoint list then starts a workflow instance on the list. On the Workflow Information page, users see the status for the initiated workflow as suspended or canceled. The Workflow Information page displays an error message that resembles the following:

RequestorId: ac01a77b-619a-dbd2-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: HTTP 401 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["864"],"SPRequestGuid":["ac01a77b-619a-dbd2-aa49-a4d2580be234"],"request-id":["ac01a77b-619a-dbd2-aa49-a4d2580be234"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["15.0.0.4631"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Mon, 12 Jan 2015 20:03:16 GMT"],"Server":["Microsoft-IIS\/8.5"],"WWW-Authenticate":["NTLM"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine

SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Cause

When the Automatically update the workflow status to the current stage name option is selected in SharePoint Designer, SharePoint must edit the list page to change the workflow status. A user needs edit permissions on the list to edit the workflow status. If a user does not have edit permissions on the list, the workflow enters a suspended state.

Resolution

Option 1

Clear the Automatically update the workflow status to the current stage name option in the Settings > General settings for this workflow SharePoint Designer panel.

 image

Option 2

Grant users edit permissions on the list.

Option 3

Add an App Step with a Set workflow status to at the beginning of each workflow stage. Follow these steps:

1.Configure your environment for SharePoint Apps. Visit Install and manage apps for SharePoint 2013 for more information.

2. Enable the App Step by going to Site Actions > Site Settings > Site Actions > Manage Site 

        Features > Workflows can use app permissions.
image

3. Open SharePoint Designer and edit the affected workflow. At the beginning of each stage, insert an App Step.

image

image

 

4.In the App Step, add Set workflow status to Insert Stage Name here.

5. Clear the Automatically update the workflow status to the current stage name option in SharePoint Designer’s General settings for this workflow pane.

image

6. Save and publish the workflow.

The App Step will now use the permissions of the SharePoint Apps to change the workflow status instead of using the user’s permissions.

 

Note. With Option 3 the Modified By column no longer shows the user who started the workflow but instead the SharePoint App account that changed the workflow status. To work around this, add the created by column to the list view to discover which user created the request.

image

Post By : Charmaine Christie-Primo [MSFT]


Comments (6)

  1. SharePoint 2013 Administrator Online Training says:

    Wooh this is very informative article. Thank you so much..!

    http://staygreenacademy.com/

  2. Mitch says:

    Great article. Information necessary when you need to limit user permissions on a list to only be able to add items, and not edit them!

    Appreciated!

  3. lifesaver says:

    Thanks for this hack you saved lots of time n effort.

  4. Thank you so much. This really saved the day for me.

  5. Prani says:

    Hi,

    Sometimes, my workflow throws the following error every now and then.. ( SharePoint online)

    HTTP Unauthorized to mysite/_api/SP.RelatedItemManager.addSingleLink?SourceListName=’guid’&SourceItemID=284&SourceWebUrl=guid’value’&TargetListName=’value’&TargetItemID=19&TargetWebUrl=guid’value’ Correlation Id: 7cf14480-98f3-f10f-af81-28960a5981dd Instance Id: d12738be-3ef9-42cc-9a2e-c0466b7476ff

    Access denied. You do not have permission to perform this action or access this resource.

    Any help would be appreciated

  6. samolpp says:

    if i am o on-premises , i dont have app development, then how can i resolve this ? i have done all the options mentioned by you except app step and still am getting the error.

Skip to main content