Thursday, January 17, 2008 5:24 PM
by
digitaldive
SharePoint workflows and starting issues
Using a workflow in SharePoint is a very powerful tool. Workflows allow for a greater degree of control and automation. When a document is added or changed in a library or list, the workflow can be set up using the SharePoint Designer wizard to automatically create list items, send an email, create to-do items, and so forth. You can also set conditions on whether the workflow runs (see screen shots below), for example, if a field contains a certain word or number. Basic workflows can be also be inserted via the canned functionality in SharePoint. Even though the wizard allows for more customization and control, it's a cinch to use.

I've been using workflows in a recent SharePoint creation to automatically send an email when an item is created in a document library. The document was created and submitted via an InfoPath form. However, I noticed a bizarre bug which I eventually found a workaround for.
The bug
On creating a new item, for the first document I added, the workflow ran fine. However, for subsequent documents, the workflow would be shown as "Starting", and would not complete, no matter how long I left it (see screen shot below).
The solution
I simply pointed the InfoPath form to a brand new document library, and then pointed it back to the original one. This seemed to solve the issue, and the workflow worked fine from then on. I'm not sure of the root cause of the problem (a SharePoint expert I talked to said it could be either server, the workflow itself or the document library causing problems), so I'm not suggesting this solution would work for everyone. However, if you find that your workflows are not running for no discernable reason, and your conditions are set correctly, give this a go!