I have gone through other forum posts and could not get the answer I was looking for.
I have an approval workflow with multiple user’s approval required once a request is raised. When the request is created in the client side (React) I am first calling the camunda REST API to create the process instance. This gives me the processId which I then use to create the request in my application DB (one of the fields is the
camundaProcessId). If the business key is supposed to be the id of my request, then I cannot get that Id until it has been created on the database.
The other option is that I could create the entry in my app DB first leaving camunda process Id field empty, then I use this entry Id as a business key (something like
tenantId:approval:approvalId?) to make the API call to camunda. Then once the process instance is started, I would update the process Id into my app DB.
Yet another option is the first method, but generating some random uuid (something like
tenantId:approval:uuid?) on the client (react) and setting that value in both camunda business key, and also my app DB.
I am using a GraphQL endpoint, but that should not matter. Do the above options make sense, or am I missing something?