Summit 7 Team Blogs

Workflow 2013 starts and then immediately cancels

While trying to implement a SharePoint 2013 workflow I ran into several snags. This blog will hopefully help anyone else that is running into workflow problems and provide a few solutions.

The problem:

I created a SharePoint 2013 workflow using SharePoint Designer 2013. The workflow was simple. It logged text to the workflow History List (http://your.site.com/lists/Workflow%20History). I wanted to keep it as simple as possible to help debug my error.

Worfklow 2013 starts and then immediately cancels

Once the workflow was created and published I went to an item in the list to manually start the workflow. The workflow would start and then after a few seconds instantly cancel. Checking ULS, no errors appeared, checking the server logs, no errors appeared. I could only find one error. Select the item -> Click the (…) -> Workflows -> Select the workflow you just ran to open it, click the blue information button.

Worfklow 2013 starts and then immediately cancels

Worfklow 2013 starts and then immediately cancels

The information given is seen below in errors one and two.

Error 1:

RequestorId: 9ed5ed28-24df-8242-d879-ff24e2afb036. Details: System.ApplicationException:
HTTP 401 {"x-ms-diagnostics":["3001000;reason=\"There has been an error authenticating th
e request.\";category=\"invalid_client\""],"SPRequestGuid":["9ed5ed28-24df-8242-d879-ff24e2
-Authenticate":["Bearer realm=\"d00b1d25-64aa-43bd-bf9b-2b43694bb4f9\",client_id=\"00000
X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Date":["Wed, 2
2 May 2013 17:26:12 GMT"]} {"error_description":"The server was unable to process the reque
st due to an internal error. For more information about the…


Error 2:

RequestorId: 3c1d32e0-537a-8fb8-c749-0da66e0559ab. Details: System.ApplicationException:
HTTP 400 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientService
S-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Fri, 31 M
ay 2013 16:51:59 GMT"],"Set-Cookie":["WSS_KeepSessionAuthenticated={4edd1d79-1ffd-4d7
f-8ec5-58a489a946ae}; path=\/"],"Server":["Microsoft-IIS\/7.5"],"X-AspNet-Version":["4.0.30319"
],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineC
hild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(Acti
vityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)


After researching these errors I noticed there was no simple solution. Each person solved the errors in different ways. I documented every solution I tried and after doing all of the following steps the SharePoint 2013 Workflow errors went away. For errors one and two follow the below steps in order. The easier solutions are listed first.

1.)    Your user has at least edit permissions on the list
2.)    Your current user has a user profile

a. Navigate to Central Administration -> Application Management -> Select the User Profile Service -> Select manage User Profiles -> Search for your account -> if an account is found you should be fine

3.)    Make sure you are not creating/starting the workflow as the SharePoint Setup/Install account or a System Account
4.)    User Profile Service Application is running
5.)    You are able to complete a full synchronization of the User Profile Service

a. Make sure the User Profile Synchronization Account has replicate directory changes in Active Directory

6.)    Last but not least is an IIS reset

a. An IIS reset will drop existing connections to your web server for a few seconds. It is recommended to do this during non-business hours.


Error 3:

RequestorId: f58f8045-c8ff-3ff0-d7d3-d4b4bb8bb7ba. Details: System.ApplicationException:
HTTP 500 The requested service, 'http://ch02sp01:32843/60cb2361c56a44639e185aec7d585
ba6/AppMng.svc' could not be activated. See the server's diagnostic trace logs for more inform
ation. {"SPRequestGuid":["f58f8045-c8ff-3ff0-d7d3-d4b4bb8bb7ba"],"request-id":["f58f8045-c8
ff-3ff0-d7d3-d4b4bb8bb7ba"],"X-FRAME OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["1
Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Date":["Wed, 03 Apr 2013 15:1
7:02 GMT"],"Server":["Microsoft-IIS\/7.5"],"X-Powered-By":["ASP.NET"]}at Microsoft.Activities.Ho
sting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Acti
vities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, Bookma
rkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWo
rkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager

Error 4:

Worfklow 2013 starts and then immediately cancels


For error three and four you just need to make sure you have plenty of memory on your machine. Once all of these steps are followed you should be in working condition for your SharePoint 2013 workflows.

As always, thanks for reading!