Using process instance id as correlation key for intermediate catch events

Hi i am new to camunda and switching from RHPAM (redhat jbpm engine).

We have used there a lot of intermediate message catch events. In the redhat engine the message is always send to a specific process instance id, so this is then stored on our objects so we can easily push a message to a process. Is it possible to define in the camunda modeler that the correlation key is the process instance id? is there some internal variable which points the the process instance id?

Hello @mho ,

using the process instance key as correlation key is good idea in first place, but not recommended for production. The process instance is indeed designed to last, but it can be restarted to solve some issue. This would cause a change in the process instance key and destroy your binding.

My recommendation is to control message correlation by providing a process variable that serves. This process variable can be retrieved in a send task and be transferred along with the outbound message. The inbound message will still hold this information and can then use it as correlation key again.

This information can be business-wise (for example an order id, a customer id …). By doing this, you have more control over the actual correlation.

I hope this helps


Hi @jonathan.lukas,

thanks for the fast reply.

I understand that to bind the correlation key to a business object is much butter, but i would like to migrate some older processes from RHPAM to camunda. i am using everywhere the process instance id, this would cost a lot of effort to change that in the backend logic.
So is there a possibility to set a correlation key to a process instance id or not?