/
Messaging

Messaging

Activities


CorrelationScope

This activity provides implicit CorrelationHandle management for child messaging activities.

Activity Parameters

The CorrelationScope activity has one parameter and it can be provided by manually inserted values or via IN arguments or variables:

Parameters:

  • CorrelatesWith (text box editor type) (type: CorrelationHandle): Specifies the CorrelationHandle used to manage child messaging activities. If you do not set this property, CorrelationScope creates an implicit CorrelationHandle automatically.


InitializeCorrelation

This activity is used to initialize correlations without sending or receiving a message. Typically correlation is initialized when sending or receiving a message. If correlation must be established before a message is sent or received, use InitializeCorrelation to initialize the correlation.

Activity Parameters

The InitializeCorrelation activity has three parameters (including DisplayName) that can be provided by manually inserted values or via IN arguments or variables:

Parameters:

  • Correlation (text box editor type) (type: CorrelationHandle): The CorrelationHandle used to associate workflow activities in the correlation.
  • CorellationData (collection editor type) (type: Collection): A dictionary of correlation data that relates messages to the workflow instance.


Receive

This activity receives a message that can be either a built-in type such as Message, Stream or XElement, or an application-defined data contract, message contract, or XML class that can be serialized.

Activity Parameters

The Receive activity has parameters that can be provided by manually inserted values or via IN arguments or variables:

Parameters:

  • CorrelatesOn (collection editor type) (type: Collection): Specifies the correlations between Receive activities in service operations of a workflow with a MessageQuerySet object.
  • CorrelatesWith (text box editor type) (type: CorrelationHandle): Specifies the CorrelationHandle used to route the message to the appropriate workflow instance.
  • CorrelationInitializers (collection editor type) (type: Collection): Specifies the collection of CorrelationInitializer objects that initialize multiple CorrelationHandle objects that configure this Receive activity within the workflow.
  • Content (Content Definition window) (type: Custom): Specifies the message or parameter content to receive. It can be either a ReceiveMessageContent activity or a ReceiveParametersContent activity.
  • OperationName (text box editor type) (type: String): Specifies the name of the service operation implemented by this Receive activity. This property is used to construct the default value for the Action property if the Action property is not explicitly set.
  • ServiceContractName (text box editor type) (type: String): Specifies the name of the service contract. This property is used to group service operations into individual service contracts. All Receive activities that have the same ServiceContractName are grouped into the same service contract (WSDL Port Type). The default value is the fully-qualified CLR name of the top level (root) activity.
  • Action (text box editor type) (type: String): 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}.
  • CanCreateInstalce (checkbox control type) (type: boolean): Specifies a value that determines whether a new workflow instance is created to process the message if the message does not correlate to an existing workflow instance. If the value is set to true, a new workflow instance is created to process the message when the message is not correlated with an existing workflow instance.
  • KnownTypes (collection editor type) (type: collection): Specifies a collection of known types for the service operation implemented by this Receive activity. This property should be used in conjunction with the SerializerOption property set to DataContractSerializer. It is ignored if XmlSerializer is used.
  • ProtectionLevel(combobox control type) (type: string): Specifies the ProtectionLevel for the message. None means authentication only. Sign means sign data to help ensure the integrity of transmitted data. EncryptAndSign means encrypt and sign data to help ensure the confidentiality and integrity of transmitted data.
  • SerializerOption (combobox control type) (type: string): Specifies the type of serializer to use for the service operation implemented by the Receive activity. The default value is DataContractSerializer, which serializes and deserializes an instance of a type into an XML stream or document that uses a supplied data contract. The XmlSerializer can also be used if more control is required over the XML.


ReceiveAndSendReply

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.

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 SendReply activity.

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

Activity Parameters

The ReceiveAndSendReply template has 2 sets of parameters that can be provided by manually inserted values or via IN arguments or variables. We will only be covering the parameters for SendReply in the current block, since the parameters for Receive have been covered in the previous section (immediately above the current activity):

Parameters:

  • CorrelationInitializers (collection editor type) (type: Collection): Specifies the collection of CorrelationInitializer objects that initialize multiple CorrelationHandle objects that configure this Receive activity within the workflow.
  • Content (Content Definition window) (type: Custom): Specifies the message or parameter content to receive. It can be either a ReceiveMessageContent activity or a ReceiveParametersContent activity.
  • PersistBeforeSend (checkbox control type) (type: boolean): Specifies whether the workflow instance should be persisted before the reply message is sent. The default value is false.
  • Request (text box editor type) (type: string): 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.
  • Action (text box editor type) (type: String): 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}


Send

This activity is used to send a message to a service. A ReceiveReply activity can be bound to a Send activity that receives a message as part of a request/response message exchange pattern on the client. (this case will be covered next in the document)

Activity Parameters

The Send activity has parameters that can be provided by manually inserted values or via IN arguments or variables:

Parameters:

  • CorrelatesWith (text box editor type) (type: CorrelationHandle): Specifies the CorrelationHandle used to route the message to the appropriate workflow instance.
  • CorrelationInitializers (collection editor type) (type: Collection): Specifies the collection of CorrelationInitializer objects that initialize multiple CorrelationHandle objects that configure this Send activity within the workflow.
  • Endpoint (combobox control type) (type: string): The Endpoint that the Send activity sends the message to. If this property is set the EndpointConfigurationName property should be null. If the parameter is set to "Endpoint", two new subparameters are displayed:
    • AddressUri (text box editor type) (type: string): The address of the endpoint in Uri format.
    • Binding (combobox control type) (type: string): The binding type that will be used for the communication.
  • EndpointAddress (text box editor type) (type: string): The EndpointAddress to which the message is sent.
  • EndpointConfigurationName (text box editor type) (type: string): The name of the endpoint configuration. This property is set when you are configuring an endpoint in a configuration file. This property should be set to the name given in the <endpoint> element in your configuration file. If this property is set, the Endpoint property should be null.
  • Content (Content Definition window) (type: Custom): Specifies the message or parameter content to receive. It can be either a ReceiveMessageContent activity or a ReceiveParametersContent activity.
  • OperationName (text box editor type) (type: String): The name of the service operation called by this Send activity. This property is used to construct the default value for the Action property if the Action property is not explicitly set.
  • ServiceContractName (text box editor type) (type: String): The name of the service contract that the service to be called implements.
  • Action (text box editor type) (type: String): 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}. If specified on a Send activity, the Receive activity that receives the message must have the same value for the message to be delivered correctly.
  • KnownTypes (collection editor type) (type: collection): A collection of known types for the service operation to be called by this Send activity. This property should be used in conjunction with SerializerOption property set to DataContractSerializer. It is ignored if XmlSerializer is used.
  • ProtectionLevel(combobox control type) (type: string): Specifies the ProtectionLevel for the message. None means authentication only. Sign means sign data to help ensure the integrity of transmitted data. EncryptAndSign means encrypt and sign data to help ensure the confidentiality and integrity of transmitted data.
  • SerializerOption (combobox control type) (type: string): The serializer to use for the service operation to be called by the Send activity. The default value is DataContractSerializer, which serializes and deserializes an instance of a type into an XML stream or document using a supplied data contract.
  • TokenImpersonationLevel (combobox control type) (type: string): The TokenImpersonationLevel allowed for the receiver of the message. It defines security impersonation levels which govern the degree to which a server process can act on behalf of a client process. None indicates that an impersonation level is not assigned. Anonymous indicates that the server process cannot obtain identification information about the client and it cannot impersonate the client. Identification indicates that the server process can obtain information about the client, such as security identifiers and privileges, but that it cannot impersonate the client. This is useful for servers that export their own objects, for example, database products that export tables and views. Using the retrieved client-security information, the server can make access-validation decisions without being able to use other services that are using the client's security context. Impersonation indicates that the server process can impersonate the client's security context on its local system. The server cannot impersonate the client on remote systems. Delegation indicates that the server process can impersonate the client's security context on remote systems.


SendAndReceiveReply

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

Adding SendAndReceiveReply template does three things besides creating the Send and ReceiveReply activities within a Sequence activity:

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

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

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

Activity Parameters

The SendAndReceiveReply template has 2 sets of parameters that can be provided by manually inserted values or via IN arguments or variables. We will only be covering the parameters for ReceiveReply in the current block, since the parameters for Send have been covered in the previous section (immediately above the current activity):

Parameters:

  • CorrelationInitializers (collection editor type) (type: Collection): Specifies the collection of CorrelationInitializer objects that initialize multiple CorrelationHandle objects that configure this Receive activity within the workflow.
  • Content (Content Definition window) (type: Custom): Specifies the message or parameter content to receive. It can be either a ReceiveMessageContent activity or a ReceiveParametersContent activity.
  • Request (text box editor type) (type: string): Reference to the Send activity paired with this ReceiveReply activity. This property must not be null. Send and ReceiveReply activities are used together on the client 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 ReceiveReply activity.
  • Action (text box editor type) (type: String): 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}


TransactedReceiveScope

The TransactedReceiveScope activity enables you to flow a transaction into server transactions created by a workflow or dispatcher.

Activity Parameters

The TransactedReceiveScope has no parameters to be set other than the DisplayName.



Related content