Recursive workflows are not permitted

There was a change in Service Pack 2 of SharePoint 2007. Sadly, this change is both breaking and undocumented, which annoys me quite a bit, even though the change itself made sense.

Basically, SharePoint Designer Workflows cannot start themselves anymore. So if you have a Workflow that is started when an item is changed and you change the item from within the workflow, previously SharePoint would start a second instance of your workflow. This was both blessing and curse. Curse because if you were not careful, you would start an infinite loop. Not fun if your boss asks you why he received 4500 mails during the night... But blessing because you could use it to build State-Machine Workflows from SharePoint Designer.

I guess it's the Infinite Loop part that triggered the change, and I think that change made sense. But please dear SharePoint team: Document a change like this, because it IS breaking, and you know as well as me that SP Designer Workflows cannot be debugged, so it's not only a pain in the ass, but it's also a way to really make people lose trust in your application.

Anyway, you can read more about this change at the SharePoint Designer Team Blog. The error message you will see in your SharePoint Logfile looks like this by the way:

08/26/2009 15:11:59.50 w3wp.exe (0x272C) 0x25E0 Windows SharePoint Services Workflow Infrastructure 72fv Unexpected AutoStart Workflow: Microsoft.SharePoint.SPException: Recursive workflows are not permitted. at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)