TrackingWorkflowExceptionEventArgs.OriginalActivityPath Property

Gets the QualifiedName of the activity that originally threw the exception.

Namespace: System.Workflow.Runtime.Tracking
Assembly: System.Workflow.Runtime (in system.workflow.runtime.dll)

public string OriginalActivityPath { get; }
/** @property */
public String get_OriginalActivityPath ()

public function get OriginalActivityPath () : String

Not applicable.

Property Value

The QualifiedName of the activity that originally threw the exception.

Exceptions are passed up the chain of exception handler activities. An exception handler may choose to throw an exception again. When an exception handler throws an exception again, a new exception tracking event containing a new TrackingWorkflowExceptionEventArgs is raised to the runtime tracking infrastructure. OriginalActivityPath refers to the activity that originally threw the exception.

The following code example demonstrates a method, named WriteExceptionEventArgs, which captures a TrackingWorkflowExceptionEventArgs. The code checks whether the Exception property is a null reference (Nothing in Visual Basic) (Nothing in Visual Basic). If it is not, the code writes the message associated with the Exception property to the console. If Exception is a null reference (Nothing in Visual Basic) (Nothing), 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.

static void WriteExceptionEventArgs(string eventDescription, TrackingWorkflowExceptionEventArgs exceptionEventArgs, DateTime eventDataTime)
{
    Console.WriteLine("\nException Event Arguments Read From Tracking Database:\n");
    Console.WriteLine("EventDataTime: " + eventDataTime.ToString());
    Console.WriteLine("EventDescription: " + eventDescription);
    if (null != exceptionEventArgs.Exception)
    {
        Console.WriteLine("ExceptionEventArgs Exception Message: " + exceptionEventArgs.Exception.Message.ToString());
    }
    Console.WriteLine("ExceptionEventArgs Original Activity Path: " + exceptionEventArgs.OriginalActivityPath.ToString());
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: