1

We have created a custom workflow activity using visual studio and declarative actions. It is deployed to a SharePoint online site collection using a sandbox solution.

We have used HttpSend activity to call remote web service. As we know, default timeout value for HttpSend activity is 60 seconds. We hit this timeout every now and then because web service is taking longer to send response back to the workflow. Following exception is thrown in case of timeout:

An unhandled exception occurred during the execution of the workflow instance. Exception details: System.Net.WebException: Exception encountered while processing the HTTP request. Exception details: 'HttpClient.SendAsync task was canceled. TraceActivityId=3eddf6e0-c023-2c41-9e1c-de8b8d469fe6'. at Microsoft.Activities.Messaging.SendHttpRequest.OnReceiveResponse(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) Exception from activity SendHttpRequest HttpSend Root Muhimbi.PDFConverter.O356.WFActions.PDFMergingActivity Stage 1 Sequence Flowchart Sequence Test Recipe 2.WorkflowXaml_154d5c8d_f3c2_4164_8193_5196a1bf1479

We have requested Microsoft to give an option to change the timeout value but as expected, they declined.

I have gone through one of the blogs by Andrew Connell and he suggested to use WaitForCustomEvent activity to overcome timeout issue. But, I could not find a way to integrate it within our custom activity.

Only workaround we have is to use try catch block and add retry logic if there is an exception of a particular type thrown by HttpSend activity.

I would like to know if anyone have experienced this type of scenario before and implemented a solution.

  • I have gone through a blog Roy Kim (roykimsharepoint.wordpress.com/tag/sharepoint-2013-workflow) and used WaitForCustomEvent activity within my custom SPD workflow action. But now I am facing another issue. I am using a web service to trigger custom event for the workflow. But, workflow does not seem to be listening to the event sent by web service. It stays in pause state indefinitely. – Kiran Chauhan Mar 3 '16 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.