System.Workflow.Activities ...


.NET Framework Class Library
HandleExternalEventActivity Class

Defines a workflow communication activity that is used to handle an event that is raised by a local service.

Namespace:  System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)
Syntax

Visual Basic (Declaration)
<ActivityValidatorAttribute(GetType(HandleExternalEventActivityValidator))> _
Public Class HandleExternalEventActivity _
    Inherits Activity _
    Implements IEventActivity, IActivityEventListener(Of QueueEventArgs),  _
    IDynamicPropertyTypeProvider
Visual Basic (Usage)
Dim instance As HandleExternalEventActivity
C#
[ActivityValidatorAttribute(typeof(HandleExternalEventActivityValidator))]
public class HandleExternalEventActivity : Activity, 
    IEventActivity, IActivityEventListener<QueueEventArgs>, IDynamicPropertyTypeProvider
Visual C++
[ActivityValidatorAttribute(typeof(HandleExternalEventActivityValidator))]
public ref class HandleExternalEventActivity : public Activity, 
    IEventActivity, IActivityEventListener<QueueEventArgs^>, IDynamicPropertyTypeProvider
JScript
public class HandleExternalEventActivity extends Activity implements IEventActivity, IActivityEventListener<QueueEventArgs>, IDynamicPropertyTypeProvider
Remarks

A local service is a class that implements a local service interface (an interface that is marked with ExternalDataExchangeAttribute) and is added to the ExternalDataExchangeService.

The HandleExternalEventActivity receives data when the ExternalDataExchangeService service raises an event with event data derived from ExternalDataEventArgs.

The HandleExternalEventActivity is a blocking activity.

Classes that derive from HandleExternalEventActivity should not implement the IActivityEventListener<(Of <(T>)>) interface because the derived class does not execute correctly.

Examples

The following code example shows how to create and set values for the HandleExternalEventActivity class. This code example is part of the RaiseEventToLoadWorkflow SDK sample from the DocumentApprovalWorkflow.cs file. For more information, see Raise Event To Load Workflow.

Visual Basic
Me.Car.Name = "Car"
AddHandler Car.ExecuteCode, AddressOf Me.Car_ExecuteCode
Me.Car.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, codecondition1)
AddHandler codecondition2.Condition, AddressOf Me.AirlineCondition
C#
this.Car.Name = "Car";
this.Car.ExecuteCode += new System.EventHandler(this.Car_ExecuteCode);
this.Car.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, codecondition1);
codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.AirlineCondition);
Inheritance Hierarchy

System..::.Object
  System.Workflow.ComponentModel..::.DependencyObject
    System.Workflow.ComponentModel..::.Activity
      System.Workflow.Activities..::.HandleExternalEventActivity
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Other Resources

Tags :


Page view tracker