Starting a process instance in script task from another process

I have two separate process definitions, one that consists of a single user task (process A) and one that consists of a single script task (process B). I am currently trying to create a workflow where a process B checks emails from an inbox, then starts an instance of process A for each unread email found. Looking at the documentation, I need to obtain the process definition ID of process A to instantiate an instance of it, but I have not been able to find a way to obtain it other than directly accessing the bonita engine database and copying it from there. Is there anyway to obtain the process definition ID without needing to do that?

You need the Process Definition ID when you use the API to start the process (here A), this is something you do from an external system but not from a Process Definition (here B).

Because you make the process call from the Process Definition B, you should be using a “Call Activity” rather than the API call. When you do this, you do not need a Process Definition ID but a Process Name and a Process Version only. You can have better information from this documentation page .