Edit

Share via


WorkflowCompletedEventArgs Class

Definition

Caution

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

Provides data for the WorkflowCompleted event.

public ref class WorkflowCompletedEventArgs : System::Workflow::Runtime::WorkflowEventArgs
public class WorkflowCompletedEventArgs : System.Workflow.Runtime.WorkflowEventArgs
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class WorkflowCompletedEventArgs : System.Workflow.Runtime.WorkflowEventArgs
type WorkflowCompletedEventArgs = class
    inherit WorkflowEventArgs
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type WorkflowCompletedEventArgs = class
    inherit WorkflowEventArgs
Public Class WorkflowCompletedEventArgs
Inherits WorkflowEventArgs
Inheritance
WorkflowCompletedEventArgs
Attributes

Examples

The following code example demonstrates an event handler method that takes WorkflowCompletedEventArgs as a parameter. The OnWorkflowCompleted method is called when the WorkflowCompleted event is raised. The code uses the OutputParameters property to obtain the value associated with the Status key and writes it to the console.

This code example is part of the Sequential Workflow with Parameters SDK Sample from the Program.cs file. For more information, see Workflow with Parameters Sample.

static void OnWorkflowCompleted(object sender, WorkflowCompletedEventArgs e)
{
    //The order status is stored in the "status" "out" parameter
    string orderStatus = e.OutputParameters["Status"].ToString();
    Console.WriteLine("Order was " + orderStatus);
    waitHandle.Set();
}
Shared Sub OnWorkflowCompleted(ByVal sender As Object, ByVal e As WorkflowCompletedEventArgs)

    'The order status is stored in the "status" "out" parameter
    Dim orderStatus As String = e.OutputParameters("Status").ToString()
    Console.WriteLine("Order was " + orderStatus)
    waitHandle.Set()
End Sub

Remarks

Note

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

When the workflow completes, the workflow runtime engine raises the WorkflowCompleted event. The workflow runtime engine passes all of the output parameters of the workflow in a WorkflowCompletedEventArgs. These include the out and ref parameters of the workflow.

Properties

OutputParameters

Gets the output from the workflow.

WorkflowDefinition

Gets an Activity that represents the workflow definition on completion of the workflow instance.

WorkflowInstance

Gets the workflow instance associated with the workflow event.

(Inherited from WorkflowEventArgs)

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also