Find the correct task to complete

Hello everyone,
I have a logic issue in my Camunda 7 implementation. And I would like to know if anyone has run into it to give some ideas to overpass it.

First of all I am building an application that exploits Camunda functionalities. There, I am starting a new instance and right after that I want to store the information of the newly created user task. From the “Start Instance” Rest Api endpoint I see that the result contains the process instance id. So normally I could match it with the task process instance id and complete it.

My problem is that my process diagram has a Call Activity right after the start event. So, I have the parent process instance id, but not the sub process instance id. And the task’s information does not contain the parent process if I am not mistaken.

Any ideas how to handle this?

Thank you!!

Hi there!
You can handle this by using the Business Key. The great @thorben wrote a blog post explaining how in detail it’s used. The sort description is that you give the process instance you start a key and it can propagate that key to all sub processes.
So if you query for a task you’d use the business key not the process instance id.

4 Likes