There are two types of correlations:
- Automatic: This is the default and out-of-the-box correlation used between two business partners which makes use of a special token called "Conversation Id" to uniquely associate a message with a conversation via Web Service Addressing (WS-Addressing) to correlate a callback message using the "Conversation Id".
- Message Based: This type of correlation enables the definition and use of "business-friendly" information carried as part of the message payload to be used to uniquely identify and associate a message with a conversation (for example, OrderId, CustomerId, etc.). This type of correlation enables the definition of multiple attributes referred to as "Correlation Properties" into various correlation sets know as "Correlation Keys".
Create the basic BPM application and BPM project (I named it OracleBPM12cCorrelationsDemoApp and OracleBPM12cCorrelationsDemo respectively) and choose "Composite with BPMN Process" in step 3 of the "Create BPM Application" and click “Finish”.
Next using the "Start Message" data associations assign the "MyId" process input argument to the "myId" process data object.
So create a new "Asynchronous Process" (named it "DemoReUsableProcess") with a single string input argument (MyId) and a single string output argument (MyId).
Using the "Start Message" data associations assign the "MyId" process input argument to the "myId" process data object.
Give your human task activity a name (for example "Demo User Task"). From the "Implementation" tab click on the green "Add" button to create a new definition. Specify a name, (for example DemoHT) and leave the rest on defaults.
To simplify the assignment of tasks, open the human task definition file and in the task assignments switch from lane participants to "Names and Expressions" and define "weblogic" as the user to be assigned our order item tasks.
Your simulated business partner process should look as follow.
Open the "Timer Catch" event and set its time cycle to 1 minute (in case there isn't a reply from the asynchronous sub-process the "Timer Catch" event will get kick-started).
Download sample application: Correlations in Oracle BPM 12c