Skip Headers
Oracle® Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management
11g Release 1 (11.1.1.6.2)

Part Number E15176-09
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

24 Communicating Business Processes Using Correlations

This chapter describes how to develop a BPMN process that communicates with other BPMN processes and services using correlations. Correlations are used to identify the instance that receives the message in the peer process.

This chapter includes the following sections:

24.1 Introduction Correlations

:Correlations enable business processes to communicate with each other based on the state an instance. The state of all the process data objects in a process defines the state of the instace.

Defining a correlation for a business process enables you to identify an instance in another process through the instance state and send a message to that specific instance.

For example you can use correlations to communicate a sales process with the corresponding shipping and mailing processes. When the customer confirms an order, the shipping process sends a message to the shipping and mailing processes using a correlation that defines that it uses the order ID to locate the instances in both processes.

After you initialize a correlation you cannot change its value because the Service Engine uses this value to localize the instance. If you try to assign a new value to the correlation this produces a Correlation ViolationError.

You can define and initialize multiple correlations for a flow object. The flow object that sends the message can use just one correlation or all the correlations defined for that flow object. If it uses all the existing correlations, then all of the values it sends together with the message must lead to the identification of the same instance.

Some flow objects, like the service task, define two types of correlations: input and output. In those cases you can initialize and use a correlation in the same activity.

The scope of the correlation is the instance of the process or subprocess where it is defined. In the case of subprocess with multi-instance loop conditions the scope of the correlation is each instance of the multi-instance subprocess.

24.2 Understanding the Components of a Correlation

The following list describes the different components of a correlation:

24.3 Typical Design Workflow

The following worklow describes the typical procedures you perform when you design a project that contains business processes that communicate with each other using correlations:

  1. Design the processes that communicate with each other.

  2. In the calling process, add the flow object that sends a message to the other process.

  3. Define a correlation for the flow object that sends the message and configure it to initiate the property aliases.

    For more information on how to define the correlation, see Section 24.4, "Defining Correlations for a BPMN Element".

  4. In the invoked process, add the flow object that receives the message.

  5. Configure the flow object that receives the message to use the correlation you defined and assign a value to the property aliases.

    For more information on how to define the correlation, see Section 24.4, "Defining Correlations for a BPMN Element".

24.4 Defining Correlations for a BPMN Element

You can define correlations for the following BPMN flow objects that you use to communicate business processes:

You can define multiple correlations for a single flow object. The flow object that sends the message can choose to use just one correlation or use all of them. In the latter it the values it uses to invoke the correlation lead to the identification of the same instace.

24.4.1 How to Define a Correlation for a Flow Object

You can define a correlation while you are defining the properties of a flow object. Studio provides two modes for defining correlations: simple and advanced. To define a correlation that contains just one property use the simple mode. If the correlation you define contains more that one correlation key each with multiple properties, then use advanced mode.

To define a correlation for a flow object:

  1. Right-click the BPMN element.

    The Properties dialog appears.

  2. Click the Implemenation tab.

  3. Click the Correlations link.

    The Correlation Definition dialog appears.

  4. Define the correlation using one of the following modes:

24.4.2 How to Define a Correlation Using Simple Mode

Simple mode allows you to define a correlation that contains just one property. This mode simplifies the definition of the correlation by creating parts of the correlation automatically based on the information you define for that property.

To define a correlation using simple mode:

  1. From the Property list, select a property.

    If the Property list is empty, create a new property:

    1. Click the New button next to the Property list.

    2. Enter a name.

    3. Select a type.

      Available types are: String, Int, Real, Decimal, Bool, Time.

  2. If the BPMN element initiates the value of the correlation, select Initiates.

  3. In the Correlation Property Alias text box, define an expression to assign values to the correlation property.

    To define a complex expression, click the Expression Builder button next to the Correlation Property Alias text box. For more information see ...

  4. Click OK.

24.4.3 How to Define a Correlation Using Advanced Mode

Advanced mode enables you to define multiple correlation keys with multiple correlation properties.

To define a correlation usind advanced mode:

  1. In the Correlation Definition dialog, click Switch to Advanced Mode.

    The Correlation Keys table appears.

  2. For each of the correlation keys you want to add to the correlation:

    1. Click the Add button.

      The Create CorrelationKey dialog appears.

    2. Select an existing correlation key or click the New Correlation Key button to create a new correlation key.

      For more information on how to define a new correlation key, see Section 24.5.2, "How to Configure a Correlation Key".

    3. If the BPMN element initiates the value of the correlation, select Initiates.

    4. Click OK.

  3. In the Correlation Property Aliases section, for each of the listed properties, define an expression to assign a value to the correlation property.

    To define a complex expression, click the Expression Builder button next to the property text box. For more information see ..

  4. Click OK.

    The Correlation Definition dialog closes and the Correlations icon appear in colours now.

24.5 Creating Correlations Keys

You define correlation keys at project level, this enables you to reuse correlation keys across the processes in your project. You can also decide to create correlation keys before adding the flow objects that use them. For both of these cases you must create correlation keys from the Structure view.

24.5.1 How to Create a Correlation Key

You can create a correlation key at a project level and later use that correlation key to define the correlations of your flow objects.

To create a correlation key:

  1. Select a business process.

  2. Open the Structure view.

  3. Expand the Correlations node in the Structure view.

  4. Right-click the Correlations Keys node.

  5. Select New.

    The Create Correlation Key dialog appears.

24.5.2 How to Configure a Correlation Key

You can configure the properties that compose the correlation keys you define.

To configure a correlation key:

  1. Enter the correlation name.

  2. If the Correlation Properties list is empty or the property that you want to use for your correlation is not defined, you must define a new correlation property. To define a correlation property:

    1. Click the New button.

      The Create Correlation Property dialog appears.

    2. Enter a name for the correlation property.

    3. Select a type.

      Available types are: String, Int, Real, Decimal, Bool, Time.

    4. Click OK.

  3. Select the correlation properties that define the correlation:

    1. From the Correlation Properties list, select the property you want to include in the correlation.

    2. Click the Select button.

      The selected property appear in the Selected list.

  4. Click OK.