Hope someone can shed some light on this.
I am implementing a sub process that act as a broker to start a process instance by message event. In it is basically a service task and a intermediate message catching event that uses:
startProcessInstanceByMessage(messageEventName, processVariables)
The purpose is to decouple the sub processes from the top level BPMN so that they can be updated independently without full re-deployment.
However, this means that the sub process started will be orphaned and does not have relationship with the actual parent. There is no method currently in the Activiti engine that allows me to start the process instance by specifying the parent process.
My question is if there is an easy way to do this without doing anything drastic like extending Activiti codes. Is there a method that can manually start an instance (call activity) and specifying its parent (the process that calls the call activity).