Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
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
ReceiveActivity Class

Service activity that implements an operation defined by a Windows Communication Foundation (WCF) service contract.

Namespace:  System.Workflow.Activities
Assembly:  System.WorkflowServices (in System.WorkflowServices.dll)
Visual Basic (Declaration)
<SerializableAttribute> _
<ToolboxBitmapAttribute(GetType(ReceiveActivity), "Design.Resources.ReceiveActivity.png")> _
Public NotInheritable Class ReceiveActivity _
    Inherits SequenceActivity _
    Implements IEventActivity, IActivityEventListener(Of QueueEventArgs)
Visual Basic (Usage)
Dim instance As ReceiveActivity
C#
[SerializableAttribute]
[ToolboxBitmapAttribute(typeof(ReceiveActivity), "Design.Resources.ReceiveActivity.png")]
public sealed class ReceiveActivity : SequenceActivity, 
    IEventActivity, IActivityEventListener<QueueEventArgs>
Visual C++
[SerializableAttribute]
[ToolboxBitmapAttribute(typeof(ReceiveActivity), L"Design.Resources.ReceiveActivity.png")]
public ref class ReceiveActivity sealed : public SequenceActivity, 
    IEventActivity, IActivityEventListener<QueueEventArgs^>
JScript
public final class ReceiveActivity extends SequenceActivity implements IEventActivity, IActivityEventListener<QueueEventArgs>

The ReceiveActivity activity is used when a workflow implements an operation defined in a WCF service contract. The ReceiveActivity can implement an operation from an already defined service contract or can define the service contract and operation within the workflow itself. The latter is known as a workflow-first contract.

The ReceiveActivity activity supports a set of predefined message exchange patterns. These patterns include:

  • One-way receive

    The client that sends the message does not expect the service to send a response. The contract operation should have a void return type.

  • Receive request - Send response

    After a message is received and processed by the ReceiveActivity activity, a response is sent back to the client. When the contract operation has a void return type, an acknowledgement is sent back to the send activity.

  • Receive request - Send fault

    After a message is received and processed by the ReceiveActivity activity, a response or a fault is sent back to the client.

NoteNote:

To ensure that persistence performs properly and does not persist transient messages, make sure that child activities of the ReceiveActivity do not persist by themselves. This can occur if the child activities go idle when a persistence provider was created with UnloadOnIdle set to true, for instance.

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
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
Page view tracker