Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Working with Process Data : Handling Incoming Messages Using Correlation Data

Handling Incoming Messages Using Correlation Data
In a process, a catch message event or a receive task waits for an incoming message to arrive. In the runtime environment there may be many instances of the process (each with different data), and many incoming messages (each with different data).
Correlation data must be used to ensure that each incoming message is received by the process instance to which it applies. The incoming data to a receive task or catch message event is compared to the correlation data in existing process instances to determine whether it applies to that process instance. You must initialize the correlation data with a value, either on the start message event, or subsequently (for example in a script task).
To illustrate how this works, consider the following example:
After the user task, the receive task (Receive Authorization) waits for the correct incoming authorization. To do this, the business analyst associates the OrderRef correlation data field with the Receive Authorization task. When an incoming message is received, the incoming data is compared to the correlation data to make sure that it applies to that process instance.
After creating correlation data fields, and associating them with the relevant events or tasks, the correlation data must be mapped with the incoming data. This is the job of the solution designer. For more information, see the appropriate implementation guide.
Creating Correlation Data
There are several ways to create correlation data fields:
using the Properties view table provided when the Correlation Data folder is selected in Project Explorer (this method is recommended if you need to create several data fields or parameters).
copying a data field and pasting it under the Correlation Data folder in the Project Explorer.
Creating Correlation Data Using the Properties View
To create a new correlation data field in the Properties view, do the following:
1.
2.
Click Correlation Data in the Project Explorer.
The Properties view is displayed.
3.
A new correlation data field is added.
As appropriate, modify the properties.
See Associating Correlation Data with an Event or Task to assign correlation data to a start message event, catch message event, or receive task.
Creating Correlation Data Using the Wizard
To create a new correlation data field, do the following:
1.
2.
Right-click Correlation Data and select New > Correlation Data. The New Data Field dialog is displayed.
If you start this wizard from the File > New menu, the first dialog is the project and package dialog, where you must specify a valid project and package. This dialog is not displayed if you right-click at the process level to start the dialog; however you can click Back to display it.
For information about how to complete the remainder of the fields in the wizard pages, see Using the Wizards (the properties of a correlation data field are exactly like those of a standard data field).
The correlation data that you created appears in the Project Explorer.
See Associating Correlation Data with an Event or Task to assign correlation data to a start message event, catch message event, or receive task.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved