Thursday, January 10, 2013

Sharepoint Fault Handler in vs 2008

Please see  Sharepoint Fault Handler in vs 2008

Also below is a copy.

Fault Handler
To get more detailed information about this error, it is necessary to add a Fault Activity (equivalent of a catch block) and to log it.
Select the workflow in the (Visual Studio) Workflow Designer, click on the lower left side of the Designer and click on the Fault Handler:
image
Another view of the Workflow Designer will show up:
image
Drag and drop a FaultHandler activity from the Workflow Foundation toolbox into  fautlHandlersActivity1 :
image
In the property page of this last activity select the FaultType property by browsing the mscrolib assembly:
image
Select System.Exception:
image
Now we will log the StackTrace into the workflow history log: drag and drop a LogHistoryList activity into the handler (if you don’t find this activity drag and drop the microsoft.Sharepoint.WorkflowAction.dll assembly to a new Visual Studio toolbox tab) :
image
Select the logToHistoryListActivity1 and set its HistoryOutcome property to the stack trace value of faultHandlerActivity1:
image
image
Rebuild the solution , redeploy (install.bat) and test the workflow.
The trace will show up in the workflow status :
image

No comments:

Post a Comment