Business Key definition and uses


#1

Was looking for a consolidate definition and uses of the Business key in Camunda. Found various references to where it is used, but noticed that Camunda docs do not seem to have a actual consolidate definition/explanation of the business key. Is this located somewhere?

Thanks guys!


business key
How does business key works?
#2

Hi,

this thread may be of interest…

Of course I may be a little biased :wink:

regards

Rob


#3

Great @Webcyberrob. I think thats great base material.

Know of any consolidate writeup of all the places and details about to quote from your thread:

  1. extra privileges
  2. it can enable some convenient and efficient functions

Thanks


#4

Various API calls (for example message correlation) are made a lot easier by using a Business Key.
Also if a process initializes many other processes through Call Activities it becomes easier to find all children of a given process if they all share the same business key.


#5

@Niall, when you say “easier” do you just mean that there is a specific field to match against rather than using process variables?

From what i can tell from the API Docs, whenever there are times where you would use the business key as a filter/search criteria (example: finding all process instances with the specific business key), you can also use the process variables.

Is there any benefits of the business key over process variables, where the “feature” or “benefit” does not have a process variable equivalent?

The biggest barrier we find to using the business key is its inability to set the business key after the process has started. Can a business key be set as part of a start event execution listener?


#6

Hi Stephen

I think one of the main advantages of using business key is that it is indexed in the database
and being indexed means that update operations will affect the performance


#7

@hassang good point! Is that documented anywhere? How much of a performance benefit are we talking? I know the difference between indexed and not indexed from a DB standpoint. So my assumption would be if you are looking for highest level of performance from camunda, we should be using business key due to the index.


#8

Hi Stephen,
Yes…I guess that’s the reason. to improve the performance of queries


#9

Hi all,

I published a blog post that summarizes the discussion here and provides some hacks to generate the business key from within the process instance: https://blog.camunda.com/post/2018/10/business-key/

Cheers,
Thorben


#10

@thorben great job! hope you can find the time to post most content like this.