Pause For gives an error


Badge +9

Per this Marian Hatala post (thx Marian Hatala‌) I put in a Pause at the top of my WF and I also put in a Commit and Pause (1 min) after every 50 transactions (Create New Item) within a For Each.  For some reason 50 records get written out and the Pause says it starts (Pausing for 1 minute) and then after 5 minutes there is an error without the Pause ever completing.

Note the Pause For works fine at the top of the Workflow. Pause completes within 5 minutes.

Why does the Pause For not work within the Loop after 50 items.

Lastly note - I change the iterations to 100 prior to the pause and same behavior - the pause started, but failed.  100 items did get written out to the list though..


11 replies

Userlevel 2
Badge +11

Hi David Busch,

Which Nintex Workflow version are you running?

Userlevel 5
Badge +14

it looks 50 items is still too much to handle for your environment.

try to lower it.

Badge +9

I don't think so because if I take off the commit and pause  and restrict the query filter to ID 1-100 it runs fine with no issue.However its not realistic for me every night to manually update the workflow to run ID 1-100, then change the WF to run ID 101-200, change the WF to run ID 201-300, change the WF to run ID 301-400, and change the WF to run ID 401-500

My objective is to have every day 500 items created.   The query filters for today checklist items which should always be a total of 500 and the For Each should create a new one for the next day.  Thus the For Each loops thru each of the 500 records and creates a new record (essentially a copy of the record from today which will then become tomorrows checklist item within the List.

If I try to run all 500 at once then I receive an error, but it does create all 500 items but twice !  Thus your suggestion for the Commit and Pause.

Lastly note the only process in my WF that would be sent to batch is "Create New Item".  

Badge +9

Nintex Workflow 2013 3.1.4.0

Userlevel 2
Badge +11

Ah, ok. It's in Nintex WF 2016 that I'm experiencing strange behavior of the Pause for action (it seems to think it's part of a loop and jumps back to an earlier action...). In NW 2013 it worked just fine in those instances where I used it.

Userlevel 2
Badge +11

Have you tried setting the expected runtime for this workflow?

Badge +9

I can try - what should I set it the expected run-time to and what does that do ...

Note when I remove the Pause For and Commit and then restrict the Query filter 99 items only it runs in 2 minutes !

If I put the Query Filter back to bring in 500, but only triggering the Pause For at every 50 iteration then the WF writes out 50 items and then the Pause For errors at 6 minutes.  The Pause For is set to 1 minute and I assumed it waited for the timer for another 5 minutes and then for some reason failed...

If I put the Query Filter back to bring in 500, but only triggering the Pause For at every 50 iteration then the WF writes out 25 items and then the Pause For errors at 6 minutes.  The Pause For is set to 1 minute and I assumed it waited for the timer for another 5 minutes and then for some reason failed...

Userlevel 2
Badge +11

Start with a 1 hour expected runtime, and if necessary increment it with 15 minutes up to 2 hours. I don't think the copying process requires that much more time.

Keep in mind that if indeed the workflow takes too much time to complete you always (at least that's my experience) get an error screen, but it keeps running in the background. However it the entire workflow takes too much time to complete indeed will give another error and may go into Restarting mode.

If that does not work, you could consider creating a list Copy item workflow, which then is started for eacht item from the site workflow using a web service call (StartNintexWorkflowOnListItem). With a little luck you won't need a Pause for in that site workflow....

Userlevel 5
Badge +14

how do you calculate and check 50 iterations? hopefully it's based on dedicated counter or loop index and not on item ID.

 

what's the exact error you get on pause within the loop?

is the error the same for set of 50 item as for whole set of 500 items?

 

do you execute any (high number of) actions on list item before you enter loop? (eg. create items, update items, update multiple items...)

 

does it (always) fail after first set of 50 iterations?  or multiple sets are processed until it errors out?

 

what else is being executed within the loop apart from creating items?

 

what does happen if you commit and pause after each item?

I know it will be very slow, but I'm interested in whether it fails after very first item or how many items it handles.

 

are there any dependencies (lookup links) among items (eg. if item 25 links to item 75...)

 

do you have any other workflows on the list that might get triggers once you create items?

 

could you post how does your workflow and configurations look like?

Badge

how do you calculate and check 50 iterations? hopefully it's based on dedicated counter or loop index and not on item ID.

*I have a variable called counter which does a math operation at the end of each iteration of the loop

 

what's the exact error you get on pause within the loop?

*its just a generic error - Error on WF

 

is the error the same for set of 50 item as for whole set of 500 items?

*its the same generic error if I set the pausse for 50 or 100

 

do you execute any (high number of) actions on list item before you enter loop? (eg. create items, update items, update multiple items...)

*no.  within the lopp there is a single create item.  prior to the loop starting there is nothing significant.  if i disable everything within the loop then the pause for works at 50 or 100 increments.

 

does it (always) fail after first set of 50 iterations?  or multiple sets are processed until it errors out?

*yes, however I change it to 100 it will fail after the first set of 100

 

what else is being executed within the loop apart from creating items?

*just determining if the next day is weekend or not which is done with some simple math operations

 

what does happen if you commit and pause after each item?

* commit works fine..pause for fails

 

I know it will be very slow, but I'm interested in whether it fails after very first item or how many items it handles.

 

If i take the counter off and pause it is not unusual to write out all 500 records but it will report back a generic error.  In other cases it may write out all 500 and then duplicate all 500 even though history says only 1 WF instance ran.  Other times it may stop after 300 with a generic error.

What I am doing now as a painful manual workaround is I am filtering the query to 75 items with out any pause or commit and there are no issues.  However, this is a huge pain as I need to change the query 7 times to change to the next set of 75.

 

are there any dependencies (lookup links) among items (eg. if item 25 links to item 75...)

*none

 

do you have any other workflows on the list that might get triggers once you create items?

*none

 

could you post how does your workflow and configurations look like?

* give me a day...thx

**Note for some reason when Nintex Blog made its changes it forced me to pick a new name ?  I was davidjohnson

Badge +9

how do you calculate and check 50 iterations? hopefully it's based on dedicated counter or loop index and not on item ID.

*I have a variable called counter which does a math operation at the end of each iteration of the loop

 

what's the exact error you get on pause within the loop?

*its just a generic error - Error on WF

 

is the error the same for set of 50 item as for whole set of 500 items?

*its the same generic error if I set the pausse for 50 or 100

 

do you execute any (high number of) actions on list item before you enter loop? (eg. create items, update items, update multiple items...)

*no.  within the lopp there is a single create item.  prior to the loop starting there is nothing significant.  if i disable everything within the loop then the pause for works at 50 or 100 increments.

 

does it (always) fail after first set of 50 iterations?  or multiple sets are processed until it errors out?

*yes, however I change it to 100 it will fail after the first set of 100

 

what else is being executed within the loop apart from creating items?

*just determining if the next day is weekend or not which is done with some simple math operations

 

what does happen if you commit and pause after each item?

* commit works fine..pause for fails

 

I know it will be very slow, but I'm interested in whether it fails after very first item or how many items it handles.

 

If i take the counter off and pause it is not unusual to write out all 500 records but it will report back a generic error.  In other cases it may write out all 500 and then duplicate all 500 even though history says only 1 WF instance ran.  Other times it may stop after 300 with a generic error.

What I am doing now as a painful manual workaround is I am filtering the query to 75 items with out any pause or commit and there are no issues.  However, this is a huge pain as I need to change the query 7 times to change to the next set of 75.

 

are there any dependencies (lookup links) among items (eg. if item 25 links to item 75...)

*none

 

do you have any other workflows on the list that might get triggers once you create items?

*none

 

could you post how does your workflow and configurations look like?

* give me a day...thx

Reply