IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing business processes > Building BPEL processes > Correlating BPEL processes

Configure correlation sets

Correlation sets are used in runtime environments where there are multiple instances of the same process running. The sets allow two partners to initialize a BPEL process transaction, temporarily suspend activity, and then recognize each other again when that transaction resumes.

A correlation set for a BPEL process consists of a name and one or more properties. Properties have a name and a type, and may make use of a property alias in order to be able to map to specific message parts.

For example, imagine you ordered a book online, and then decided to cancel the order just before it had reaches the shipment phase. To do this, you will have to be able to identify your book ordering process instance using your name and the order number that you were given when you first placed the order. In this case, the process would have defined a correlation set with two properties: "name" and "orderNo".

The following procedure creates a correlation set for a process:


Procedure

  1. Add a Correlation set to your BPEL process as follows:

    1. In the tray, click the add () icon beside Correlation Sets.
    2. Give the new correlation set an appropriate name.

  2. Create a correlation property as follows:

    1. Click the add () icon beside Correlation Properties.

    2. In the Add Correlation Property window, assign an appropriate name to the new property in the Name field.

    3. Select an XSD simple data type from the list.

    4. Click OK.

  3. Create a property alias as follows:

    1. In the Description tab for the Correlation Property, select an operation in the interface table, and click Add. All of the interfaces used by the process are listed here, and multiple property aliases can be defined for each operation.

    2. In the Create Property Alias window, specify if this variable is an input or an output.

    3. Select the correct part or element from the list that matches the type defined in step 2c, and click OK


What to do next

The following procedure creates a correlation set reference for an activity:

  1. In the BPEL process editor, click the activity that you want to associate with a correlation set, and click Correlation in the properties area.

  2. Click Add and configure the set as follows:

    1. In the Direction field, chooseSend if this set is to be used for outgoing messages, Receive for those that are incoming, or Both when it can be used for either.

      The options available here will depend upon what kind of activity you are configuring. For some activities like receive, reply or elements like receive, this field is set for you.

    2. In the Initiation field choose from one of the following:

      • Select Yes if this is the first time this correlation set has been executed, and this is when the messages that will link this user to this workflow are to be stored.

      • Select No if the correlation set will be always initialized by another activity.

      • Select Join if multiple activities can initialize the correlation set. This is especially useful if you are designing a process with multiple parallel receives, and you are not sure which one will get executed first. If you specify Join for both of them, then the first one to run will initiate the correlation set, and the second will use the existing value.

    3. In the Correlation Set field, select the appropriate pre-existing correlation set from the drop-down menu.

Correlating BPEL processes