A strange side effect

Hi everyone.
i’ve a strange side effect and i don’t understand how i can resolve.

I’ve 2 spring boot app with camunda engine.
For facility i call App1 and App2.

The two application share the same database.
The App1 have a ProcessA.
The App2 have a ProcessB.

Process B is very simple:

  • one start event
  • one simple user Task activity
  • one end event

In every App exist a Bean called TestBean.

So…in App1 exist a Bean named “TestBean” that simply write “Hello…i’m a bean in ProcessA”.
…in App2 exist a Bean with the same name" that simply write “Hello…i’m a bean in ProcessB”.

The 2 Application run in different machine.

Since the 2 Process have the same database in the ProcessA i can call the ProcessB
with a Call Activity. And it’s work.

After the ProcessB has finished the processA can continue.
And now the strange side effect…
In the ProcessA the activity Task immediately after the “subprocess” call
a Bean with a Delegate Expression…but instead of calling the Bean in the App1(with processA) it call
the Bean in the App2( with processB) although now the flow has returned to processA.

I do not understand how avoid this strange effect.

thank you