How can I get parent's process instance id from call activity

Hi all,
I have an issue, close to this one How can I get parent's process instance id from call Activity (sub-process), but not exactly the same, just because I’m starting my workflow with a message…

My basic need is to cancel an instance, I want the process instance id of a workflow. Above, my workflow, very simple.

image

I want to have the process instance id of this workflow, but all my workers are in the sub-process, so I’m getting the id of the child instead of the parent.

And, because I want to start my workflow with a message which contains a correlation key, I don’t have any instance id when I start my workflow.

So, have you an idea how I can get the parent process instance id, without any worker in my parent workflow ?

Thanks !

Sounds like a valid feature request to extend the protocol here zeebe/gateway.proto at main · camunda/zeebe · GitHub

Right now you have no knowledge about that in the clients. You could see it via exporters (or e.g. operate), since the Records contain such information.

Feel free to create an issue here Issues · camunda/zeebe · GitHub

Greets
Chris

1 Like

Hi,
Thanks @Zelldon for your answer.

As a workaround, I have found an other way to stop my workflow, I don’t do a Cancel, but I throw a message that will stopped the workflow.

Fyi, I have created an issue : Get the parent id directly inside the ActivatedJob · Issue #11046 · camunda/zeebe · GitHub

1 Like