ReceiveAndSendReply Template Designer

Applies to: yesVisual Studio noVisual Studio for Mac noVisual Studio Code

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

The ReceiveAndSendReply template

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

Use the ReceiveAndSendReply template designer

Access the ReceiveAndSendReply activity designer in the Messaging category of the Toolbox. The ReceiveAndSendReply activity designer can be dragged from the Toolbox and dropped on to the Workflow Designer surface wherever activities are usually placed. Dropping the activity designer 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 Receive Activity Designer.

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 the properties grid, and some can be edited on the Workflow 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's best 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 can't edit this property because it's 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 ellipsis button next to the Content field in property grid, or by clicking the Define button next to 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's not explicitly set, its value defaults to:{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