1

OK, this is a first. I created a workflow for a list in sharepoint designer, its a basic if\else 1 step workflow, if an items been created or modified, it sends an email. After a few revisions (make a change, publish, test, repeat...) a weird issue started, Im now getting several copies of the same email sent to me. Not 2 or 3, but hundreds. After about 20 minutes, they seemed to have slowed down, but Im concerned because I have no clue why they started in the first place.

Were running WSS 3.0, and Im using Sharepoint Designer 2007 SP1. Any help would be greatly appreciated.

ewitkows
  • 3,528
  • 3
  • 40
  • 62

1 Answers1

2

Did you create an endless loop by any chance?

That is: Is your Workflow set to execute when an item is modified, and does the workflow modify the item?

Prior to SharePoint 2007 SP2, this will generate an infinite loop:

  1. Workflow starts because the item is modified
  2. Workflow modifies the item
  3. Because the item was modified, another workflow will start
  4. The other workflow modifies the item again
  5. Because the item was modified, yet another workflow will start
  6. Repeat until server crashes

In SharePoint 2007 SP2 this was changed and recursive workflows are forbidden now, but it looks like exactly that is happening with your workflow.

The reason it slows down after a while is possibly because the SharePoint or Mail server is starting to get overloaded.

Which version of WSS 3.0 are you running? Check in Central Administration -> Operations -> Servers in Farm and verify against this table. SP2 is version 12.0.0.6421, any lower version is vulnerable against the infinite workflow loop.

Michael Stum
  • 177,530
  • 117
  • 400
  • 535
  • I think you nailed it Michael.. yes.. I am running a workflow when an Item is modified both created and modified. So heres my question then, I have a workflow that has 5 steps (available in a drop down list). Once a user completes a task, they update the drop down list.. which will trigger the workflow to send an email to a person assigned to the appropriate step, and also update the list item to indicate who now "owns" it. That second part is just a nice to have.. but thats whats causing it to modify over and over.. and ideas how I can do this without mailbombing a user? – ewitkows Nov 11 '10 at 02:41
  • 1
    @ewitkows As the very first step of the workflow, add a Condition in which you check that the "Who owns it?" field is empty and Stop the workflow if not. This is assuming that this field is only updated once. If you need to update the field more than once, add a new field that tracks the state somehow. Essentially you have to give the workflow a way to check if it should be executing right now or not, and stop it if it shouldn't. Another solution is to update to SP2, but that of course is easier said than done. – Michael Stum Nov 11 '10 at 03:09
  • Thanks so much Michael, I think youre right on point with that solution – ewitkows Nov 11 '10 at 13:28