Thanks @Nele
I later found this thread in the forums which is exactly the same topic.
https://forum.camunda.io/t/how-to-terminate-parent-process-from-subprocess/19955/2
I didn’t give much credit at the beginning, but when I saw your comment suggesting the same solution, I decided to give it a try.
The reason I hesitated was, I was thinking that I had to attach a boundary event on each and every one of call activities in the subflows. That would be messy and not a good solution.
But the things did not go that way. I just added a boundary event on call activity inside my root model. I did not attach any boundary events in the subflow which stands in the middle. And it worked.
Diagram1 (root model)
Subflow1 (model in the middle which has no attached boundary event)
Subflow2 (model at the bottom which fires the escalation event
When this runs, Subflow2 ends with an escalation event, Diagram1 catches the event and terminates everything. Subflow1 never goes to the end.
Exactly what I wanted.
Sample models may not make sense, but they are just samples to prove the concept.
Thanks for the help.
Guvenc