Parent Child process associations

Hello Everyone - I was trying to find a method or an API using which I could attach a process with a parent process.

I know we can find processes which are linked using history service but I want to have the child processes visible in Cockpit whenever I am exploring the parent process. I tried to find some API where rootProcessInstance could be set but in vain.

All processes which are started off by a Message Event or Signal Event from any other processes are logically linked and I consider these as the child processes of the process which generated the event/signal.

Any help or pointers?

Thanks.

To further elaborate, I want the child processes, which are either kicked off via Signal Events or Message Events (via Java API calls) to be shown in the “Called Process Definitions” of the process which triggered the event.

Is there any way to show the processes triggered by any event from another process as their children in Cockpit?