At work we had a problem after installing SP2 on WSS 3.0 related to an aleatory behavior of OnTaksCreated. For more info about this check "http://fightingvssharepoint.blogspot.com/2009/06/ontaskcreated-in-wss-30-sp2.html". We've not found the fix yet so we're trying an alternative solution. Consists in taking out OnTaksCreted and moving all its activities to OnTaskInit. If you do have the solution to the SP2 OnTaskCreated issue please let me know! But if you don't keep on reading please...
Custom workflow short brief: creates a new taks in the "Tasks" list, set the workflow status and sends an email to the "assignedTo" person. The email body is filled in with the recently created task information. In order to retrieve this info there's a call to the method "GetWorkflowTask". The method's signature is:
SPWorkflowTask task GetWorkflowTask (int taskID)
This method retrieves the task fine when called within OnTaskCreated. But if I call it within OnTaskInit, after the Createtask activity, retrieves null. Why?
Thanks! Jorge.