Hi Team,
I am new to modelling processes in Camunda. Hence my queries might be slightly naive!
Nevertheless, i want to ensure that i have my fundamentals right to ensure that i’m modelling my process right. Here are my queries:
- I am calling a sub-process from my main process as a ‘Call-Activity’ component. However, in the runtime the main process and sub-process have different process instance ID’s generated. However, i want the main process instance ID and the sub-process within the call Activity to have the same instance ID for certain practical purposes. Is this possible in process model? If so how?
Hi Kiran,
Process instance Id’s need to be unique. If you need to aggregate process instances into a cohesive set you could:
Use a unique business key. Hence if the business key is passed from master to called subprocess, you could query on business key to get all related process instances…
regards
Rob
Thanks Rob! That was quick.
that would address my concern!
Hi Rob,
Just to add on to the same query, can i have multiple business keys in my process?
Let’s say, i have a process modelled for receiving a call from a customer for an enquiry regarding my products. In this scenario, my process would centre around the customer and also the products that i’m offering. Thus i would want to define the customer as well as the products as the keys and i would also receive various messages at several points in the process around these entities.
Hi Kiran,
You can only have one business key in a given process instance. However, when you call a subprocess you could potentially pass across a new composite key based on customer Id and productId, eg customerId-productId. Hence you can still query and return the related set if you use a ‘like’ rather than ‘equals’.
Note you can also query on process instance variables. Hence use customerId as businessKey and in your subprocesses, you could correlate messages based on the productId as an instance variable…
regards
Rob
Hi Rob,
Thanks for the answer. This is helpful.
Kiran B~