TrackingWorkflowExceptionEventArgs Class
Contains data associated with an exception that occurs during the execution of a workflow instance.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
When an exception occurs during the execution of a workflow instance and a TrackingProfile that is associated with the workflow instance includes a WorkflowTrackPoint configured for a TrackingWorkflowEvent.Exception, the workflow tracking infrastructure sets EventArgs to an TrackingWorkflowExceptionEventArgs in the WorkflowTrackingRecord that it sends to the tracking service.
Note: |
|---|
TrackingWorkflowExceptionEventArgs is used only by the runtime tracking service to pass information in a WorkflowTrackingRecord. |
The following code example demonstrates a method, named WriteExceptionEventArgs, which captures a TrackingWorkflowExceptionEventArgs. The code checks whether the Exception property is Nothing (Nothing in Visual Basic).
If it is not, the code writes the message associated with the Exception property to the console. In addition, the code converts the value of the OriginalActivityPath property to a string and writes it to the console.
This code example is part of the EventArgs Tracking SDK sample from the Program.cs file. For more information, see EventArgs Tracking Sample.
Shared Sub WriteExceptionEventArgs(ByVal eventDescription As String, ByVal exceptionEventArgs As TrackingWorkflowExceptionEventArgs, ByVal eventDataTime As DateTime) Console.WriteLine(vbCrLf + "Exception Event Arguments Read From Tracking Database:") Console.WriteLine("EventDataTime: " + eventDataTime.ToString(CultureInfo.CurrentCulture)) Console.WriteLine("EventDescription: " + eventDescription) If exceptionEventArgs.Exception IsNot Nothing Then Console.WriteLine("ExceptionEventArgs Exception Message: " + exceptionEventArgs.Exception.Message.ToString()) End If Console.WriteLine("ExceptionEventArgs Original Activity Path: " + exceptionEventArgs.OriginalActivityPath.ToString()) End Sub
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: