Is Camunda Platform 8 missing the "Bussiness Key"? Because I'm not sure how to efficiently handle duplicate records in Camunda Platform 8

Consider the case below:

We have a system in place to trade book orders, and we keep track of them in a separate database with an id for each order. Now, when we start the process to trade the order, we can use the order id as the camunda platform 7 business key to link the process instance directly to the order. In Camunda Platform 8, however, this is not the case.

Because the “Bussiness Key” is absent from the Camunda Platform 8. I’m not sure how to efficiently handle/avoid duplicate for given trade order?

3 Likes

Hi @ramakrishnan707

There is no first-class entity “Business Key” in Camunda Platform 8.

You could use a message start event for the process and use your business key as the correlation value for the message. This has the effect of correlating the start message with the running process, so you do not get a duplicate. The caveat is that this only works when the process is running. It is not idempotent when the process instance has completed, and will start a new one.

References:

hope this helps,
Josh

2 Likes

@jwulf

Thank you for your guidance.

The Java Zeebee-java-client version was 8.0.2.
Before your input, I started the process with the snippet below.

client.newCreateInstanceCommand().
				bpmnProcessId(key).latestVersion().variables(data).send().join();

Questions:

  1. In addition to reference links, I can’t find a zeebe command to start a start message event. Cloud, please provide the reference samples or assist me with the zeebe command to start the message event with correlationValue/key.

  2. Is there any specific reason, Why the Camunda team removed the “Business Key” field from first-class entities in Camunda Platform 8?

  3. If there are any changes, a subsequent version of Camunda 8 will include the business key?

Greetings, Camunda Platform 8 Team!

I’d like your opinion on the aforementioned Usecase.?

Regards, Thank you,

Hi @ramakrishnan707

  1. You can publish a message. A builder method is available the ZeebeClient. e.g. client.newPublishMessageCommand(). See zeebe/ZeebeClient.java at 8.0.2 · camunda/zeebe · GitHub.
  2. Camunda Platform 8 is built from the ground up. Every part is newly built. So far we have not yet seen a use case that required us to re-introduce this property as a first-class citizen. You can use messages to correlate an event in your system to a process instance. Likewise, you can use a businessKey variable in your process instances that you can read in your job workers to correlate the process instance to your system’s data (note that you can also give it a name that fits better to your domain).
  3. this is not planned at this time. If the solutions described in answer 2 don’t solve your problem, please let me know.

Hope this helps.

Nico

2 Likes

@korthout Thanks for your direction and Let know the status as well

Hey @korthout ,

Within C7, business keys are very usefull on correlating process instances and external systems records. This is true not only when sending messages to running processes, but also when searching form them. Would you suggest any other way to achieve this without the business key?

Regards,
Victor Franca

Create a process variable called “businessKey”…

Josh

Would we get same performance on processes and tasks searches by variables as we would by a business key?

2 Likes