Export (0) Print
Expand All

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)

[SerializableAttribute]
[ToolboxBitmapAttribute(typeof(ReceiveActivity), "Design.Resources.ReceiveActivity.png")]
public sealed class ReceiveActivity : SequenceActivity, 
	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

Community Additions

ADD
Show:
© 2014 Microsoft