none
SharePoint Designer emails are sending non-stop duplicate mails sent every second until a workflow moves on RRS feed

  • Question

  •  

    This is a puzzling problem.

    I have a holiday process which sends emails at various steps.

    Unlike other posts, the emails are sent out but with non-stop spamming, with duplicate emails fired out every second or so until the workflow progresses.

    It's a 3 step workflow:-

    1. Employee raises a request for holiday in a custom list with a calendar view. A new workflow is started when an item is created and picks up a) their AD profile from the Created By entry and b) their manager profile from a list lookup, again linking to the user or group option in a list.
    2. They enter days and the workflow starts, first of all calculating days left against days remaining, which is gets from a second list (incidentally, I have to manually wire this up to the list ID rather than matching the Created By profile against the AD users i've got in this list as SharePoint Designer workflows won't pick up a user as a value unless it's a 'creatd by' or 'modified by' user... that's a nice to know though, not the meat of my problem!)
    3. If there aren't enough days, change status in the list to Rejected request, email applicant informing them and Stop the workflow and log...
    4. If there are enough days, email the manager then Wait for the workflow Approval Status to equal 0#Approved

    2 Works fine in SharePoint, setting status etc, but leads to spams with the declined notification email (literally every second)

    3 leads to spam mails to the approver requesting input, again literally every second sending out the same email (I am not using the list approval as there are different managers involved)

     

    I have googled my heart out and not found this problem elsewhere, plus none of the 'how to' sites list a status change as necessary in workflow to stop it sending duplicate emails. I am sure it is to do with a missing element in my custom workflow though, probably something really simple I've overlooked.

     

    any help would really be apprecaited, I am sure I am being dense and have overlooked something simple!

     

    Thank you

    Tuesday, June 17, 2008 12:12 PM

All replies

  • The problem you describe sounds like an endless loop type condition.  The workflow is configured to start on create and on edit of the item.  The workflow edits the item itself, triggering the workflow to start again.

     

    If that's the case, you can use a technique I blogged about here to solve it: http://paulgalvin.spaces.live.com/Blog/cns!1CC1EDB3DAA9B8AA!995.entry

     

    HTH,

     

     

     

    • Proposed as answer by Ben Lee 101 Thursday, November 26, 2009 2:45 PM
    Tuesday, June 17, 2008 12:43 PM
  • That is absolutely spot-on! I am working through your solution with content types, so I’ve not yet resolved it, but that is definitely the problem.

    Thank you so much for your very prompt response.

     

    Tuesday, June 17, 2008 2:11 PM
  • This works for the first update and stops the workflow from running again however How would this work the next time the item is updated?  Your workflow would never run again.


    Jim
    Tuesday, November 25, 2008 12:32 AM