Friday, April 10, 2009

Workflow Errors

Although you can get lot of wierd errors but I am here describing the ones I got and spent almosta day figuring out:

"Operation is not valid due to the current state of the object"
and
"Exception from HRESULT: 0x8102009B"

The funny part is that these are really not errors which halt your progress. These
errors can occur when you try to start a workflow that is

--------------------------------------------------------------
a) already running

or

b) errored

and therefore cannot be started again.
The stack trace will look something like:
Microsoft.SharePoint.SPException: Exception from HRESULT: 0x8102009B ---> System.Runtime.InteropServices.COMException (0x8102009B): Exception from HRESULT: 0x8102009B
at Microsoft.SharePoint.Library.SPRequestInternalClass.AddWorkflowToListItem(String bstrUrl, String bstrListName, Int32 .....


-----------------------------------------------------------------

So I would suggest you to check the item or wait for few mins before workflow shows up in the "View Workflow history" pane. For some reason when you kick start the workflow through the code it takes few mins to actually start.

No comments:

Post a Comment