0

I came up with the workflow shown below, which seemed to do the job at first. The purpose of the workflow is to notify via email that a document is about to expire. First, it checks if the notification is required, if "yes", then it loops until the entered document expiry date is the same as the calculated expiry date minus 30 days, and if this happens, it sends a notification email and changes the required notification to "no" to stop the loop. The worklow started properly for the items it was assigned to and did what it had to do in some instances, but after a few days I noticed that it stopped sending notifications, and checking on the issue, I saw some suspended workflows with the following message: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.TimeoutException: The HTTP request timed out after retrying for 10.00:00:00.

If someone has any advice on how to fix this, what I did incorrectly or what better workflow option I can apply, please let me know.

I appreciate your input.

Sincerely,

Manuel

enter image description here

enter image description here

  • I wonder if you put a pause timer in there if that would help. The thing that would concern me about your WF is that it's looping constantly. I wonder if there is a threshold limit on this and maybe that's throwing the error--maybe someone smarter than myself can answer that. Since you're doing a today check, you really only need to run the loop once a day, so pause for one day then loop, pause then loop. Maybe you can start by pausing for a hour at a time and see if the result is any different. – Nate Dec 10 '15 at 19:59
  • Thank you very much Nate, I will start looking into utilizing a pause timer, as this is most likely a limit reached type of problem. – Manuel Leyva Dec 10 '15 at 21:05
0

I have no proof, but I would support blaming a limit on a loop. If you are not using it for something else, I came across a novel solution for this problem.

1st, make a workflow that only sends out the email. I recommend using a SPgroup as the distro so you don't have to go back and edit the workflow later. 2nd, make a hidden calculated column that is expiration day - 30. 3rd, go into the library settings >> information management policy settings. There set a retention schedule on the document type to "Start Workflow" when your column from step 2 is met.

A timer job runs nightly (and can be changed) that will trigger the workflow that sends out the emails when the notification date occurs.

I think this was my source: http://sharepointduffbert.com/2014/07/17/using-the-information-management-policy-specifically-the-retention-policy-in-sharepoint-2010/

  • I have added a "pause for duration" action, to pause the loop one day as Nate sugested and will let you guys know how it runs. Thank you for your help. – Manuel Leyva Dec 11 '15 at 1:50
  • Update: It started working properly, but after a couple of weeks they began to become suspended, so, is back to the thinking stage. – Manuel Leyva Jan 8 '16 at 18:41
  • I have had the same issue with pause for x. Best bet is the Information management policy settings timer job. Get SP workflows completed ASAP. Then fire off another one later. You can use steps with this solution. – Jammin4CO Jan 15 '16 at 21:23
  • Hello Jammin4CO, thank you for your help. I have set the notification through Information management policy settings and it seems to do the job. – Manuel Leyva Jan 18 '16 at 16:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.