Correlation Data
TIBCO ActiveMatrix BPM supports the use of correlation data, which allows a process instance to be identified by some arbitrary, process-specific piece of business data - thus avoiding the requirement to store a special process instance identifier as part of the business data.
When a process is invoked by an external client or process, a unique element of the incoming data can be extracted and used to initialize a correlation data field in the process.
If a subsequent input message is received, the same unique element of the incoming data can be extracted and used to compare with and identify a specific process instance via its previously stored correlation data.
In the following example, the RenewSub process is part of an order management application that handles subscription renewals. The process receives details of an order which are checked and confirmed in the Confirm Details user task. The Receive Authorization task then waits for authorization from the external application, after which the Renew user tasks handles renewal of the subscription.
Part of the incoming data that is submitted by the external application is an "Order Reference" that uniquely identifies a customer. The process designer creates a correlation data field called OrderRef:
- In the Start Event, OrderRef is initialized with the value of the incoming Order Reference data element.
- In the Receive Authorization task, OrderRef is assigned the value of the incoming Order Reference data element. This value is then correlated against the list of current OrderRef values (maintained internally by TIBCO ActiveMatrix BPM) to identify the process instance to which the incoming message refers.
The following diagrams show how this works. The order management application calls the RenewSub process to start two instances of the process. In each case, the OrderRef correlation data field is set to the value of the incoming Order Reference data element - Cust1 and Cust2 respectively.
Subsequently, the order management application sends an authorization message for Order Reference Cust1. This value is extracted into the OrderRef correlation data field. TIBCO ActiveMatrix BPM uses this value to identify that the message should be directed to process instance 1.
See the TIBCO Business Studio Modeling User’s Guide for more information about correlation and how to use it.