Hi!
I have a process that calls a subprocess via CallActivity.
The two processes are deployed in different spring-boot applications (parent/child) with deployment-aware=true and a shared DB.
To map the input and output variables we use a DelegateVariableMapping class, which exists only in the parent application.
The subprocess has a start event with “async before” followed by a ServiceTask and an end event with “async after” configured.
Our expectation was that the output mapping would be performed in the parent application, but that doesn’t seem to be the case.
Furthermore the mapping is attempted in the child application where the mapping class does not exist.
Is there a way to use DelegateVariableMappings in this setup?
We are using the following versions:
Spring-Boot: (v2.2.1.RELEASE)
Camunda BPM: (v7.12.0)
Camunda BPM Spring Boot Starter: (v3.4.0)
We faced the same problem and talked about it with some knowledgeable people. The answer was: it’s not possible with DelegateVarMappers as of now. There is a conceptual gap at the point where the execution is trasferred back from the called process to the caller (some code is executed in the context of the “wrong” application). It might be implemented in a future version of the engine, but it’s not a simple task since it requires changes at some deep places.
This restricts the usage of this otherwise nice concept. You have to devise another solution to reuse the mapping code when using CallActivities. This is possible.
Many thanks for the answer!
It is a pity that it is not possible because it is our concept to do everything in delegates and as little as possible in the BPMN itself.
Does a ticket already exist (bug / feature request)? I think there should be at least a hint in the documentation regarding this limitation.
The only possible solution seems to me to be a shared library that contains the mapping. Or are there other approaches?