I am using SharePoint 2010. I have a site workflow which is scheduled to run every night. It has started "misbehaving". I cannot say it errors - because the strange behaviour that it exhibits is to run through the workflow - get to the end no errors and then pauses for a few minutes and starts again.
There is a pause for 1 min at the start of the workflow, but nothing at the end.
I didn't (and still dont) understand what was happening so at the end of the workflow I have added a Log in history saying "should be end of workflow" immediately followed by an End Workflow action. I have added a Log in history as the first action - "starting workflow".
When the workflow runs I can see the "starting workflow" in the log, and when it has completed the actions I can see the "should be end of workflow" message in the log - so I know it hits that action. But the status of the workflow still says in progress, and after a few minutes the workflow starts at the beginning again with "starting workflow". It is not starting another instance, it is the same workflow instance just going back to the beginning.
I have run the workflow manually (i.e. not from a schedule) and it runs through with no errors - gets to the "should be end of workflow" message and then errors "Failed on Start (retrying)".
What should I look for/try now. (I can terminate the workflow manually so it is not continually re-trying, but this makes the "automated" system more of a manual proces"
Thanks in advance
I originally thought there may be an issue with looping. There are no Loops as such.
There are 3 For Each actions (not nested). i.e. For Each1 and when that is finished For Each2 and when that is finished For Each3. After For Each3, is the last Log in History. I put that in place to make sure that the workflow came out of the For Each3. i.e. "Should be end workflow" which is in the highlighted action below is written out to the log.
Thank you for your reply.
- I know that the End Workflow should not be needed - as the workflow should end. But it doesn't, so I added the End Workflow to try and force it to end, and the End Workflow does not end the workflow either. I have added a message to the common area of the End Workflow Action item - so that it should appear in the log history if it has fired. But that never appears in the log.
- I have many other workflows which run and do not exhibit this symptom
- The same "strangeness" occurs whether I run this on a schedule or manually.
- I have looked at the link you attached.
I have been to Central Administration> Monitoring > Timer Jobs > Review job definitions and to me it looks as if there is only one instance of the Scheduler ? (If there were more than one would I see an identical line item with a different web app ?)
I have been to Central Administration > System settings > Manage servers in this farm I can see something called Nintex Live workflow service installed on the central admin server (and no other server). I cannot see anything called Nintex Workflow Scheduler. (I am assuming that the Nintex Live workflow service runs the Scheduler ?)
I have looked at the timer job status and it looks as if there is only one instance running ?