Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.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)
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

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.

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);
System..::.Object
  System.Workflow.ComponentModel..::.DependencyObject
    System.Workflow.ComponentModel..::.Activity
      System.Workflow.Activities..::.HandleExternalEventActivity
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker