OnTaskCreated activity is trouble. 

I meant to write this for quite a while and kept forgetting about it...
 
We've had numerous situations while developing Windows Workflow Foundation workflows in which either the OnTaskCreated or the OnTaskChanged activity would not be called ("fire"). The behaviour was non-deterministic, whereas sometimes it would work and then it wouldn't. E.g. I'd add an arbitrary line of code and then it would work.
 
Well, long story short, after following all the paths that could normally go wrong, like checking whether the taskID and the taskProperties are properly set, and also to check that all objects could serialize ok, and installing all relevant Hotfixes and Updates etc., I resorted to a recommendation to simply leave out the OnTaskCreated activity and have not had any problems ever since.
 
Posted on 27-Aug-09 by Jennifer Neumann
2 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
Tags: Sharepoint, Workflow
 

Comments

Sunday, 7 Feb 2010 05:36 by Eugene Rosenfeld
Which versions of the .Net framework / SharePoint were you using when you got this error? Do you know if this is still an issue with .Net 3.5 and SharePoint service pack 2? Thanks.

Sunday, 7 Feb 2010 06:01 by Jen
Eugene, yes that was on .Net 3.5 and SharePoint SP2. As we resolved the issue by omitting the OnTaskChanged activity I can't really tell if there is a fix available for this by now.

Name:
URL:
Email:
Comments:

CAPTCHA Image Validation