Tuesday, 3 June 2008

Approval Workflow does not send Email to approvers

Thanks to Bryant Duke for this one:

I finally found the underlying problem with email being sent with the Workflow. After much research and digging, I found several different articles which addressed the issue. Each one of them presented a portion of the solution, but none of them clearly explained it to me. I will try to explain what I mean.

First of all, I didn't know of a MAJOR limitation to the task list of a site collection. Apparently, you can only have ONE task list in a site collection with advanced option of "Send email when ownership is assigned". This option can be found under List Settings, Advanced Settings. After testing on two separate installations, I can conclude that if you turn this option on for both Task Lists, only one of them can actually send email on immediate notification. They will send email for late tasks, deleted tasks and even changed tasks, but the behavior was intermittent.

While creating, deleting and changing the options of two or more task lists, I watched the property and values which changed in the background. You can do this by downloading and installing "Sharepoint Manager 2007" from code-plex. After you download and install this tool (which is a great tool), you can use the tree structure to explore your way down your portal farm configuration. First open the main + at the farm level, then


-Content Service

-Web Applications


-Site Collection




-Alert Collection

This is assuming you are using a fairly default portal installation, and you are using the default Task List in the Document Center. If not, explore to the appropriate Webs section you are working in.

Under the "Alert Collection" of the appropriate Webs section, you should see a "System" object which will show you the properties of the "Immediate" alert template. If the object is not present, no immediate alerts will be sent. Also notice, that if you set two separate Task Lists with the option "Send email when ownership is assigned", that there will still only be ONE system object. In the properties of the object, you can see which list it is bound to under the "List" property.

If the task list is not sending immediate emails, then go to the list and change the option "Send email when ownership is assigned" to NO, close the list and wait a few minutes (usually about 5 minutes). The timer service should delete the "system" object.

Once the object is gone (you can check Sharepoint Manager 2007 using the "Refresh" option), then go back to the task list and re-enable the option. After about 5 minutes, the "System" object should return for that list.

I hope all of this make sense, and can help people solve the "Missing Emails" mystery.