brianknight
Explorer

Workflow fails on start error

I have a scheduled site workflow that for some reason will error out with the message "Failed on Start".  The workflow will run for approximately 35-40 minutes before the error occurs.  It will also be doing tasks associated with the workflow.  When I look at the workflow status, I see the error "The workflow could not update the item, possibly because one or more columns for the item require a different type of information".  I find this odd as all this workflow is doing is matching up a student with a teacher, capturing the teacher's email address, and writing the teacher's email address to the list.  I'm performing a Query list to pull in all the forms in a list.  Right now there around 1000 items.  I'm pulling out the list ID and a studentID and assign those to collection variables.  My next step is a loop to review each item.  I perform a Get Collection operation to assign the studentID to a workflow variable.  The next step is an Execute Sql.  I'm quering a database to select the email address of the student's teacher by matching the student's ID against the studentIDs in a teacher's class list.  I then write the teacher's email address to a workflow variable.  The last step is to update the form with the teacher's email address that I retrieved from the previous step.  The point of all this is for teachers to review a specific document created when our students go out into the community.  Since a student can change teachers each year, it was a bit of a pain to do this annually.  Also, it is possible that a student could change classrooms during the course of the school year.  That way when a teacher opens up her dashboard page, he/she sees all the created documents for his/her classroom.  I essentially call it the MyClassroom View.  When i first tested this in my demo environment, I ran into no issues. However, there were only 10 or so forms in there.  Now when I run this against my production environment, it fails.  It probably gets through 40% of the forms before it stops. I'm guessing I'm hitting some threshold, but I really don't know what it could be.  1000 forms isn't that much to me, but maybe I'm being a little nieve on that.  Any one have some ideas?

0 Kudos
Reply
7 Replies
kunalpatel
Collaborator

Re: Workflow fails on start error

@brianknight .....What type of data type you're using for workflow variables and also could you tell what kind of SharePoint columns they're updating it to?

0 Kudos
Reply
brianknight
Explorer

Re: Workflow fails on start error

The workflow variable is a single line of text and the list column is a person/group.  The list view I'm creating does a filter against the teacher column where the teacher is listed there.  Inserting an email address there works.  I verified the email address column I'm pulling are all email addresses and I verified that by looking through the database.  There are only 80 students so it is easy to eyeball it.  

0 Kudos
Reply
SimonMuntz
Nintex How-To Center Expert
Nintex How-To Center Expert

Re: Workflow fails on start error

What happens if you batch your loop and make it pause every 100-200 loops?
0 Kudos
Reply
brianknight
Explorer

Re: Workflow fails on start error

I can try that and get back to you to see if it will work.

0 Kudos
Reply
brianknight
Explorer

Re: Workflow fails on start error

Ok @SimonMuntz  added in a counter that once it hits 100, pause for 5 minutes, reset the counter, and continue.  I ran it twice and both times in the second pause (gone through 200 items), the workflow errors.  At this point, it is a generic error pointing me to this Microsoft link http://go.microsoft.com/fwlink/?LinkID=323543&clcid=0x409.  It feels I'm hitting some sort of threshold.  I've noticed the writing of the list items are well behind what is happening with the workflow.  I'll see the list begin to update when it is in the pause stage.  I'm not sure if lengthing the pause will help or not.  Any thoughts here?

0 Kudos
Reply
SimonMuntz
Nintex How-To Center Expert
Nintex How-To Center Expert

Re: Workflow fails on start error

Does looking at the ULS logs give you a hint as to what may be happening?
0 Kudos
Reply
brianknight
Explorer

Re: Workflow fails on start error

@SimonMuntz I haven't found anything in the logs as of yet.  I'll keep digging.  I have found if I filter down the amount of items this workflow has to edit, it usually works.  The number differs from time to time. I've seen where 500 items will function and other times it will stop at 200.  That is why I keep thinking it is a threashold. I do see errors from time to time that it could not write to the list.  The error message is speculating that it couldn't write to the column may have required a different type of information.  I've looked through the information.  I know it is all correct email addresses and those populate poeple columns without an issue.  I've tried to spread out the workflow by have a longer pause and shorting the loop counter.  It helps, but it never gets through all the possible entries.  

0 Kudos
Reply