Share via


ReceiveAndSendReply Template Designer

The ReceiveAndSendReply template is used to create a pair of pre-configured Receive and SendReply activities within a Sequence activity that are correlated as part of a request/response message exchange pattern on the server.

The ReceiveAndSendReply Template

Adding ReceiveAndSendReply template does three things besides creating the Receive and SendReply activities with a Sequence activity:

  1. Configures the OperationName, ServiceContractName properties of the Receive activity.

  2. Binds the Request property of the Receive activity to the Send activity.

  3. Creates a CorrelationHandle as a variable in the parent activity.

Using the ReceiveAndSendReply Template Designer

The ReceiveAndSendReply activity designer can be found in the Messaging category of the Toolbox, which is accessed by clicking the Toolbox tab in Workflow Designer (Alternatively, select Toolbar from the View menu, or CTRL+ALT+X.)

The ReceiveAndSendReply activity designer can be dragged from the Toolbox and dropped on to the Workflow Designer surface wherever activities are usually placed. This creates a Receive activity that can be configured with the Send activity designer and a correlated SendReply that can be configured with the SendReplyToReceive designer.

For more information about using the Receive designer to configure the Receive activity, see the Receive Activity Designer topic.

For more information about using the SendReplyToReceive designer to configure the SendReply activity, see the following section.

Properties of SendReply

The following table shows the SendReply properties and describes how they are used in the designer. These properties can be edited in properties grid and some can be edited on Workflow Designer designer surface.

Property Name Required Usage

DisplayName

False

The optional friendly name of the SendReply activity. The default is SendReplyToReceive.

Although the use of a non-default value for the friendly DisplayName is not strictly required, it is a best practice to use such a value.

Request

True

Reference to the Receive activity paired with this SendReply activity. This property must not be null. Receive and SendReply activities are used together on the server to model a request/response messaging pattern. This property specifies which Send activity is paired. In the designer, you cannot edit this property because it is automatically bound to the Send activity from which you created the SendReply activity.

Content

False

Specifies the message or parameter content to receive. It can be either a ReceiveMessageContent activity or a ReceiveParametersContent activity. Edit this property by clicking the ellipse button beside the Content field in property grid or clicking the Defineā€¦ button beside the Content label on the Receive activity designer surface. Both display the Content Definition dialog. For more information about how to use this box, see the Content Definition Dialog Box topic.

CorrelationInitializers

False

Specifies the collection of CorrelationInitializer objects that initialize multiple CorrelationHandle objects that configure this Receive activity within the workflow. Click the ellipsis button next to the CorrelationInitializers property in the properties grid to open the Add Correlation Initializers dialog box. For more information about using this box, see the Add CorrelationInitializers Dialog Box topic.

Action

False

Specifies the action header of the message. If it is not explicitly set, its value defaults to:

https://tempuri.org/{service contract namespace}/{service contract name}/{operation name}

PersistBeforeSend

False

Specifies whether the workflow instance should be persisted before the reply message is sent. The default value is false.

See Also

Concepts

CorrelationScope Activity Designer
InitializeCorrelation Activity Designer
Receive Activity Designer
Send Activity Designer
SendAndReceiveReply Template Designer
TransactedReceiveScope Activity Designer