'Camunda process versioning using "Process Instance Modification" migrate call activities

In our project we have problem with camunda process versioning. We have read some guides and decided to use Process Instance Modification over Process Instance Migration due to limitations that the last approach has.

As we see Process Instance Migration does not allow us to change current variables (based on their previous value, and current wait point we stay), sometimes we only want to change variables because we change delegate executions code and we know that business model (BPMN) haven't bean changed.

So currently I am trying to develop migration framework based on Process Instance Modification.

And first issue I encounter is:
How properly migrate process instance which currently stays on wait point in Call Activity?

For example, I have process: enter image description here

I start it. One exectuions stays on wait point before Message 1 event. Another gets into Call activity: enter image description here

And stays there before Message 3 and Message 4.

By using Process Instance Modification I stop processes in Call Activity and then start them again (changing variables, and bpmn model to the latest). How can I attach them to the parent process instance which called Call activity in the first place, to make it return back to the parent process instance (which called Call activity) and proceed with processing (executing Task 6). What if I want to migrate parent process as well?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source