Read my post about (Shared Services Provider stuck on "Provisioning in Progress) for a background on why I ran into this issue.
I read a lot of blogs/forum postings of people that had a similar problem so I figured I'd write up a blog post and hopefully save some other people some time.
If you are trying to set a workflow to start through code like so:
//get the workflow associated with this doc lib and kick if off manually
SPWorkflowAssociation wrkFl = docLib.WorkflowAssociations[new GUID(GUID_OF_WORKFLOW_TO_START)];
mysite.WorkflowManager.StartWorkflow(fileToUpload.Item, wrkFl, wrkFl.AssociationData, true);
You may run into the issue I had where the workflow starts but remains in the "Starting" state and NEVER completes.
A lot of the blogs/posts said that you need to pass "AssociationData" to the workflow, which is basically some XML data that the workflow needs to start. I checked my workflow and found that it didn't need any "AssociationData" other than just passing in the workflow objects AssociationData property.
Another colleague of mine suggested setting the isAutoStart boolean flag on the overridden StartWorkflow method. Once again, this wasn't the fix for me either.
What ended up being my problem is that my site didn't have a Shared Services Provider setup for it. Read my post (Shared Services Provider stuck on "Provisioning in Progress") to see how to setup a Shared Services Provider. Once that is setup, be sure to make sure that the “Windows SharePoint Services Timer Service” is running. Once the “Windows SharePoint Services Timer Service” was running all the workflow's that were stuck in "Starting" status ran through and changed their status to "Completed".
4fc4ffb4-b86e-4fce-a54a-2ff3fb03d3f1|1|5.0