So you are writing Nintex workflows to deal with admin tasks. Which is awesome
. You can do so much with them, especially with the ability to schedule workflows to kick off when you need them to, loop through multiple items using a site workflow, basically the sky is the limit.
However very much like me you come from a coding background and you troubleshoot your workflow, with commentary. This is the best way to see where the workflow is going and where it might be bombing out by adding commentary and watching for any issues.
By the way a bit of a sideline - did you know you don't need to use a Log to history action to log a comment - you can edit any action, go to Common on the ribbon and write a history message from the action itself
But we digress. So you are troubleshooting your workflow and it works wonderously. However when you schedule it and its looping through multiple items and doing some work, suddenly out of nowhere you get the message above, that the Workflow failed to start... But clearly it did start, but at the end of a looping session, or halfway through it just stops working.
Now there are limits on the number of items you should be looping through, but often you will see this with 50-100 items, which should work just fine. Funny thing, remove your comments from the workflow and run it again... voila, it works again. Something in the engine seems to stop the workflow when it iterates through multiple items and writes comments, and the number of times it does this is variable. As such we suggest use the comments for your troubleshooting, but comment them out or remove them completely when you want your workflow to run in production, it will save you a lot of headaches.
BTW - we also find it useful to make sure you put an email address in Nintex Settings to notify you if there is an error in your workflows, otherwise you might sit for days with a workflow erroring without realising your system has a problem.
So to sum up:
- Use comments for testing - this is a great way to troubleshoot
- Remove comments when putting the workflow into production
- Always have a support address or someone set up to receive failure notifications on Nintex settings