Eric D. Schabell: JBoss BPM Suite 6.2 - How to use the Correlation Key

Wednesday, December 9, 2015

JBoss BPM Suite 6.2 - How to use the Correlation Key

Now that the final product has been released in the form of JBoss BPM Suite 6.2, we thought we might share some insights with you.

When you first take this product for a spin with one of the updated demo projects, you will notice a subtle change. It got me to thinking that I could point out a few of these tips and tricks to your as the product approaches delivery to the public.


Figure 1: Start process task form with Correlation Key split
expanded here to show the form field and normal
start process task form hidden behind link.
When starting a new BPM project instance after you have deployed your project, you are used to seeing a pop-up with the product that is your generated start process task form. This form has either been generated by the process designer or you have spent time deliberating over the data required to start your process instance.

With JBoss BPM Suite 6.2 your form will appear as before, but it now contains a split entry with the top part being a Correlation Key and the bottom part being your normal task form.

What is a Correlation Key you ask?

This is a field that is optional when starting a process and will not be expanded by default. You will need to click on it to expand the field where you can enter any business related id you like to be able to track the process instance you are starting. 
Figure 2: Correlation key is noted in the process
instance details.

See figure 1 for example of what the start process form for our JBoss BPM Travel Agency project looks like.

The key will need to be unique for active process instances and is shown during the life of the process instance in the overview information. It will be blank if not provided or contain the key entered at the start of the process instance life cycle, see figure 2.

Note you will get an error if you try to use an existing Correlation Key with a process instance still active that already has one. Figure 3 shows an active process instance with a Correlation Key that you can not reuse until that process completes.

The Correlation Key's will be maintained in the JBoss BPM Suite persistence data source (a fancy way of saying they keep it in a database table) so that you can define a filter on the new data sets feature to view your keys. 

Data sets will be covered in a future article in the series on what's new in JBoss BPM Suite 6.2.


Figure 3: Overview of process instance in active running
state with a correlation key that is in use.

This article should provide good insight into how the Correlation Key is leveraged as a business aware key for identifying process instances.
Looking to Automate your business?