Home
Our Work
Services
Small Business Intranet
Samples
Training
SharePoint
Hosting
    

dbWeb > Blogs > Brandt Fuchs > Posts > Workflow E-mail Nightmare!

Workflow E-mail Nightmare!
I'll share my experience here as a warning, to others who build workflows in SharePoint Designer, in hopes that you may avoid this type of headache.
 
I had created a workflow that was supposed to start manually.  I had set it temporarily so that no workflows would start at all, and when I went to re-enable it I accidentally checked 'Automatically start this workflow whenever an item is changed'.  I solved the problem by changing the workflow start option back to manual, but this little mistake revealed to me something I wouldn't have expected.
 
In the workflow I had an if branch where the conditions don't matter.  In the actions section I had 3 actions.
  1. Update List Item
  2. E-mail this Message
  3. Stop Workflow and Log this message.

My assumption has always been that the actions would run in sequence, but this was not the case.  The workflow ran after the first time the item was modified.  When it ran the actions above, the workflow was stopped before the update list item had taken effect.  This caused another workflow to start (based on my initiation conditions set were set to whenever an item is changed).  This continued... and continued, until about 2000 of the same e-mail had been sent out. 

When this happened it became impossible to view the dispform.aspx page of the list item for which the workflows were running.  I also was unable to get to the workflows screen for that list item, and not just becasue I couldn't navigate through the dispform.aspx page.  I constructed the appropriate url to take me directly there and received an error.  The only way to stop the e-mails was to change the workflow.

Comments

There are no comments yet for this post.