Hey folks,
i have a use case where the business key has to be changed at runtime. Business background is a input management process that correlates incoming messages to running process instances.
Business demand is to have all process instances grouped within the same business key (even our input management process). As far as i know (and API Documentation shows) that a business key can only be set when a process instance is created.
Of course there are a few workarounds at hand (splitting processes, use “plain” process variable) but the best approach would be to use the concept of a business key for that case.
There was a discussion back in 2015 to implement changeable business keys: https://groups.google.com/forum/#!topic/camunda-bpm-dev/kd9iZ-I_j9E
Anything on your roadmap so far to implement this? Or any other suggestions how to deal with a situation where a business key is determined at runtime of a process instance?
Kind regards,
Matthias
@mschulte why do you “need” to use businessKey? What is the reason for not using a process variable as the equivalent of the businessKey?
Thanks @StephenOTT for your answer and your hint to a similar question. Sadly, using the internal api as described there won’t work in our scenario because we are not in the first transaction of the process.
We “need” the businessKey because its easy to come up with a guideline that setting that special variable is mandatory for enterprise-wide processes. Of course this would also work with “normal” variables but we would need a convention then telling that anyone should use variable “xyz” (and name it exactly like that) in each and every process application.
Moreover, its a question of performance. For example, the business key is stored at process instance level in history not on variable instance level. In consequence you don’t need a join for querying after process instances regarding one business key.
1 Like