Workflow fails to start (large list)


I have built a site workflow that is taking rows from a list (it's an overtime claim list) and building a CSV file for the payroll team to process onwards for reporting. I tackled this by querying the list and passing each of the fields needed into collection variables. Then it pauses for 1 minute to dehydrate the job to the SharePoint timer service. Next, it passes into a for-each loop, where each of the collections are cycled through in turn to produce the variables. This is done with parallel actions (12). Some of the parallel actions need some regex on the output variables to remove commas (we are saving to a CSV at the end). Within the loop, I am building a string value to collect all the row item data into a chunk.

Once exited from the loop, another build string is used to produce headers and then adds the chunk with the appropriate commas to separate. Finally an email goes off to the payroll team with the CSV attached.

This worked for test, when I only had a few hundred items in the list, but now that has risen to nearly 2500 items, which is not large in SharePoint terms, but I am not sure whether the workflow is able to handle the volume of process actions. With this number of items, the workflow starts quite quickly, but then waits for a lot more than one minute (the pause or 1 minute). I can see a status shows as in progress.

 

22994i586C1ED5CC7D8361.png

22995iE4B3867B847F466A.png22996iBF4670A48DF0FF84.png

After about 20 minutes, workflow history shows that there is an error. Scrolling to the bottom of the history (a long way down), the error simply states: Error System Account Overtime Payroll Extract failed to run. Am I going about this in the best way, as it seems that I am running into a timeout? When I look at the history, I can see it has recorded a large number of actions and then seems to stop, mid flow during one of the loops.

Is there a way to streamline this or improve the efficiency? If there is a timeout, can it be adjusted, and if so, to what value?

Hopefully someone can help me find a solution to this. Thanks in advance.


2 replies

It looks like my problem is definitely to do with processing a large number of list items. I tried to reduce the date span down from an entire month, to just 6 days. When I did this, the workflow seemed to work through without issue. I found some items on this forum relating to batching the workflow into processing chunks at a more manageable size and also.


So, I added a Run-If action set to run every 200 loops, which sets the loop counting variable back to zero and pauses for 5 minutes. This is supposed to allow the workflow to handle the larger list.


Here is the modification of the lead-in and first part of the For-Each loop:




Then the other side of the parallel actions is the lead out of the loop, with these actions. (I am creating a manual history list to capture each item as it loops through.



 


What is happening though, is not quite what I was hoping for. The workflow ran overnight and it seems that the pauses are taking much longer than the configured values, followed by errors, then continuing. Here is the log output:



Have I got something wrong, or is there a chance that there is an environmental problem?


Getting somewhat desperate to find a solution to these issues.


Thanks in advance.

Badge +5

SmashedMonkey, I’ve run into the same issue, but with 45000 items in the list. My only success has been reducing the For-Each chunks to around 100 with a 5-minute pause. Anything over that and it will choke pretty quick. I’ve been able to process about 5000 items at a time using that size.

I too am seeing though that a 5-minute Pause turns out to be more like 8 or 11 minutes, and it varies for some reason. Surely has to do with the WorkFlow Manager and the batching process, but I haven’t been able to identify the issue.

Any insight Nintex support could provide would be helpful.

TIA

Reply