Lost again a few hours today.
Apparently workflows on your SharePoint site need the hidden ‘OffWFCommon’ feature to be enabled. If not the workflow code is simply not executed.
The annoying thing is that there is no indication that the workflow is not starting. You can assign the workfow to a list , let the workflow start on an item, no error or exception. So they seem to execute but actually nothing is started. I noticed this because the workflow ‘status’ field remained empty. Normall it contains: ‘In progress’, ‘Completed’, ‘Exception occurred’, … Even the SharePoint logs remained silent.
After hooking up my Visual Studio debugger to the SharePoint site ( which was based upon a custom Site Definition), it became clear that the code of the workflow was never executed. On an other site collection the custom workflow did work. So it had to be something with the settings of my new site collection.
This post pointed my in the right direction. It turned out that to enable workflows to run, you need to activate the ‘OffWFCommon’ feature. Adding the feature to my Feature list in the Site Definition solved the problem.
After adding the feature in my Site Definition the workflows started correctly.
<Feature ID=”C9C9515D-E4E2-4001-9050-74F980F93160″ />