AnsweredAssumed Answered

Foreach Update Workflow Failing

Question asked by scameron36 on Sep 3, 2014
Latest reply on Nov 2, 2015 by fpotvin

I have 3 source lists that feed into a master list.  Each source list contains data pulled from a different database, and using 3 site workflows (1 per source), get updated or added in to the master list overnight.  2 of these work perfectly fine, but the 3rd always fails after about 1000 records.  The first 2 contain about 200 items each, but the 3rd contains around 2400.  There is no helpful error message when it fails, just "An error has occurred in ... ".


Previously, we were using a standard SPD list workflow that ran on every item's update/create, and took 5-6 hours to complete all of them.  The new Nintex site workflow processes about 1000 updates in 45-50 minutes, which is a huge improvement.


A summary of the workflow is:

  • Pause for 5 minutes
  • Commit pending changes
  • Query source list and put all IDs into a collection
  • For each ID in collection
    • Log ID to workflow history
    • Store fields to update into variables (x25)
    • If Created Date = Modified Date
      • Create new record in master list with data
      • Set SendEmail to Yes
    • Else
      • Update existing record in master list
    • Increment counter
    • If counter = 30
      • Commit pending changes
      • Reset counter to 0
  • If SendEmail = Yes
    • Send email notification


We have tried increasing and decreasing the number of records per commit, but that doesn't make a difference.  It is always failing after about 1000 records.  The other 2 workflows that work are identical to this one, just pointing to a different source.


This is on Sharepoint 2013 with Nintex Workflow 2013 (  This workflow is supposed to be step 4 of 7 in the nightly update, but it's not very useful in its current state.  Does anybody have any ideas why it fails every time?