Defining Business Process Correlation Sets

Business process instance identifiers are instantiated from attributes that exist in messages. As a result, the runtime engine requires a correlation mechanism for all messages to ensure that instances of various message types can be routed to the correct instance of the business process.

In a business process service, request and response operations and service invocations can be associated with a correlation set. The correlation set binds sections of the business process that process asynchronously. For example, if a business process receives two messages, a correlation set can be used to ensure that the second message received is processed by a specific instance of the business process service that was instantiated by the original message. Correlation sets define a collection of properties that are then bound to individual pieces of data within a message. When a message is properly correlated, the data for the properties defined in the initial message matches the data for the correlation properties defined in a subsequent message.

During runtime, the correlation set IDs are listed in the Enterprise Explorer under the Business Process instance in the Service Container category.

To define a business process correlation set:

  1. Create a business process service.

  2. Select the Business Process tab.

  3. Expand the Properties section in the Business Process page or open the Properties Panel view.

  4. Define a correlation set:

    1. Click inside the business process canvas.

    2. Click New in the Properties view.

      A default <CorrelationSet#> appears in the Correlation sets box.

    3. Select the default correlation set name in the Name field and a enter a new name.

      The name change is reflected in both the Correction sets list box and in the Name field.

    4. Create a variable for the correlation set. Click Create under the Variables table.

      A new variable appears in the table named CorrelationSetVariable#with a type of string.

    5. Name the variable. Select the default variable name and type a new name in the Name column.

    6. Define the data type for the variable. Click in the Type field, and select a data type from the drop-down list.

      Note

      Correlation properties are limited to simple types. You can have a correlation property nested within an XML document, but the correlation cannot be performed on subtrees of an XML document.

  5. Associate a message with the correlation set:

    1. Select the Request/Response operation or the service invocation on the canvas.

    2. In the Properties panel, select one of the following:

      • For a request or response operation, select the Correlations tab.

      • For a service invocation, select one of the following:

        Service Invocation Correlations

        TabDescription
        Request Correlations

        Defines the correlation on the Request message to the invoked service.

        Response Correlations

        Defines the correlation on the Response message returned from the invoked service.

    3. Click New and select the correlation set in the list box to display the correlation set variables in the Variables table.

    4. Associate each of the correlation properties with an operation in business process. Click in the Variable Reference field and click the ellipse box to display the Variable Reference Dialog.

    5. Choose from the following:

      • For a request or response operation, expand the Interface Variables list, select a variable from the list, and click OK.

      • For a service invocation, expand the Invoked Service Variables list, select a variable from the list, and click OK

      The selected variable populates the Variable Reference field.

  6. Initiate the correlation set. Choose from the following:

    • If you are using the correlation set for the first time, or applying this correlation to a service invocation, select Initiate correlation set.

      A correlation set can only be initiated once for a business process that contains the correlation set.

    • If you are using the correlation set for repeatedly, choose Do not initiate correlation set.

  7. Save the service. Select File|Save from the main menu bar.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com