Associating Correlation Data with an Event or Task

Catch message events and receive tasks must have correlation data associated with them. Message start events can optionally have correlation data.

For more information about correlation data, see "Correlation Data" in TIBCO Business Studio Concepts.

Note: If you are configuring a message start event, and do not want to use correlation data with the event, select the No correlation data initialization required check box in the Correlation Data section of the Interface tab. If you select this check box, you must ensure that correlation data is initialized (for example, using a script) before it is required in the process.

By default, all correlation data is associated with an event or task, but you can explicitly associate only selected correlation data as described here.

Note that if there are no active process instances that match the correlation data when the message is received, the default behavior is to not reply to the message until a process instance that matches the correlation data become available (you can also set an optional correlation timeout period (see step 6 below)). However, you can also specify that if a process instance with matching correlation data is not found, to immediately reply to the message. This is accomplished using the Correlate Immediately option -- see Specifying Correlate Immediately.

Procedure

  1. In the Process Editor, select the event or receive task.
  2. Select the Interface tab.
    Tip: If the Interface tab does not display the Correlation Data section, make sure that the event or task you have selected is one of the types listed previously. Other types of events or tasks do not require correlation data and therefore do not display this section on the Interface tab.
  3. In the Correlation Data section, click .
  4. On the Select Data Field dialog, select the correlation data you want to associate with the event or task, then click OK.
  5. In the Correlation Data section, select the mode of the correlation data.
    Note: Depending on the type of event or task, TIBCO Business Studio provides appropriate defaults. For example, start message events are usually where correlation data is initialized, so the default mode for start message events is Initialize.
    • Correlate - (Intermediate Catch Message Event and Receive Task only)  The specified incoming data is compared to that of existing process instances to ascertain the target of the request.
    • Initialize - Specifies that the correlation data is expected to receive its value from the incoming data. For a start message event, a process instance is started, then the correlation data field is initialized with a value from the incoming data.
    • Join - (Start Event or Received Tasks without incoming flow only)  Causes the correlation data (mapped from the input data) to be compared to the correlation data for any existing process instances. If no matching process instances are found, a new process instance is started. If the correlation data matches that of an existing process instance, the request is directed to that instance (a new process instance is not started).
  6. Optional: If you want to configure the timeout of the correlation event, click the Resource tab. Expand Correlation Timeout and define the timeout you require. The correlation timeout is calculated from the time the BPM receives the message.
    Note: You may want to configure the timeout of the correlation event to avoid a problem of either:
    • an event that should correlate to an earlier process instance that does not correlate, sits waiting and then correlates with a later process instance with the same correlation data.
    • an event that does not correlate immediately and waits in a queue, potentially permanently, using up resources unnecessarily.