BPMN Call Across engines

Is it possible to make a BPMN call activity across engines?

Use Case
I want to create multiple tenants using schema based isolation, hence each tenant has their own engine. I want an additional engine which contains common sub-processes. Hence Id like a process in a tenant to call a common subprocess (much like the tenant marker approach).

Workaround
I could make a rest call and start the subprocess, but then Id have to use a callback mechanism to handle the return. Hence the desire for a cross engine call activity.

regards

Rob

To the best of my knowledge, the answer is no. A call activity expects the called “child” process to be within the same instance as the parent.

You’ve already suggested the solution to the problem, namely to use a REST call via the HTTP connector to other instances. Passing of values can be achieved by including them in the payload of the REST call or by using the message event interfaces.

Where a high level of interactivity is required to emulate the shared process variable state supported by a call activity, you might consider a mechanism (i.e. a Java class) to automatically update variables from parent to child or vice versa. For example, when an activity causes a change in the value of a process variable, a function could be called that would automatically send a message to parent or child via the event message interface. This would require passing the URL and process instance ID of the parent and child processes to each other.

When the REST call is made, the parent pushes its REST interface message URL (e.g. https://camunda1.mycompany.com:8443/engine-rest/engine/default/message) and process instance ID to the child. If you use the message interface to start the child process, you must also pass the "resultEnabled":true value (available in Camunda 7.6.X) in the REST call so that it will return a Process Instance ID of the child.

While I don’t have direct experience working with it, the Java API appears to be extremely rich and may offer an alternative, albeit more complex, alternative to “bind” two Camunda instances together. That said, the purported “Next Generation BPMN” that Camunda has outlined might resolve this.

My own company is deploying potentially hundreds of instances and the mechanism for their interaction will probably need a great deal of coordination to allow to appear functionally as a single “service”.