I am working with Nintex in SharePoint 2010. I have developed a site workflow that updates a Days Open field. Pretty Simple logic:
Query all open items -> Loop through Each -> If Status Contains Waiting: Add 1 to column Waiting Counter -> Else -> Update Days Open (Current Date - Create Date - Waiting Counter)
The workflow updates all items successfully, but it does not complete. The workflow runs each night, but errors out after all items are processed. I just added the set status to complete and the end workflow. I have other Nintex workflows running that complete out themselves without the Statuses.
Looking through the error that Nintex emails out every morning, it appears all items are processing correctly and then the workflow errors out much later on.
Any ideas what I'm missing? Thanks!
I had a similar problem before with a workflow. I'm not sure what caused the problem as all of my items were processed. I thought it must have been related to the amount of items being processed.
I saw that the workflow completed execution without errors when I limited the items being processed to 50 to 100 and thus reducing the execution duration.
What helped me in the end was to add "commit pending changes" actions after all item update actions which seemed to help SharePoint processing the items in a safe manner.
How many items do you try to process with your workflow and how long does the workflow take to complete its execution?
My workflow processes anywhere from 50 - 100 items. And looking at the action history, it only takes about 2 minutes to run through all of them. However, the workflow is scheduled to run at 1 AM, but it doesn't start until 4:25 or so. It ends a few minutes later, then logs an error 5 minutes after that.
This morning however, after adding the End Workflow and Update Status actions, it was still running as of 8:30 AM. All the items had processed correctly, but it was still running.
I added the commit pending changes action and re-published, lets see what happens tomorrow!