CorrelationScope Activity Designer

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The CorrelationScope activity designer is used to create and configure a CorrelationScope activity that provides implicit management of child messaging activities using a CorrelationHandle object.

The CorrelationScope activity

The CorrelatesWith property specifies the CorrelationHandle used to manage child messaging activities. The Send and Receive activities contained in the Body are configured to use the CorrelatesWith property of the containing CorrelationScope activity to perform correlation.

Use the CorrelationScope Activity Designer

The CorrelationScope activity designer can be found in the Messaging category of the Toolbox, which is accessed by clicking the Toolbox tab on the left side of the Workflow Designer. Alternatively, select Toolbox from the View menu, or press Ctrl+Alt+X.

The CorrelationScope activity designer can be dragged from the Toolbox and dropped on to the Workflow Designer surface. This creates a CorrelationScope activity with a default DisplayName of CorrelationScope. The DisplayName can be edited in the header of the CorrelationScope activity designer or in the DisplayName box of the Properties window.

To specify the CorrelationHandle used by child messaging activities, select the ellipsis button beside the CorrelatesWith field in Properties window to display the Expression Editor dialog box. This property can also be set on the activity designer surface.

The activities scoped within the correlation are specified by dropping their designers within the Body box within the CorrelationScope designer.

The CorrelationScope properties

The following table shows the CorrelationScope properties and describes how they are used in the designer. These properties can be edited either in Properties window or on the Workflow Designer surface, and often in both.

Property Name Required Usage
DisplayName False The optional friendly name of the InitializeCorrelation activity.
CorrelatesWith False Specifies the CorrelationHandle used to manage child messaging activities. If you do not set this property, CorrelationScope creates an implicit CorrelationHandle automatically.
Body False Specifies the activities within the scope of the correlation.

See also