Blog - Robert Bogue [MVP]
Rob's Notebook
SharePoint Calendar
Thor Projects LLC - Welcome

InvalidOperationException "The event receiver context for Workflow is invalid" Problems with onTaskChanged in a SharePoint Workflow

Posted by Robert L. Bogue on Thursday, 30 Nov 2006 09:06 | 0 Comments | Professional

If you're dropping a onTaskChanged activity and you're finding an event in the ULS like the following ...

11/30/2006 08:56:04.12  OWSTIMER.EXE (0x05D4)                    0x0B48 Windows SharePoint Services    Workflow Infrastructure        72er Medium   System.InvalidOperationException: The event receiver context for Workflow is invalid.     at Microsoft.SharePoint.SPEventReceiverDefinition.ValidContext()     at Microsoft.SharePoint.SPEventReceiverDefinition.ValidReceiverFields()     at Microsoft.SharePoint.SPEventReceiverDefinition.GetSqlCommandToAddEventReceivers(IList`1 erds)     at Microsoft.SharePoint.Workflow.SPWinOESubscriptionService.CommitNewSubscriptions(Transaction txn, IList`1 erds) 

The problem may no with the event receiver, rather that in the CreateTask activity you didn't associate properties for TaskID, TaskProperties, or CorrelationToken.  Thus there's no context for the event to call back to.

Comments

Leave your own comment

Name

Url

Email

Comments