Direct Call activity multi instance vs. multi instance sub process

Hi,

I have a process I want to run multiple times (in a “multi instance” way), from a parent process.
I’m wondering what the advantages/disadvantages are for making this happen in the following ways:

  1. A multi instance call activity directly in the parent process.

  2. Or a multi instance sub process box (with a start–>call activity–>end inside it)
    (like shown halfway down this page: https://blog.camunda.org/post/2017/02/camunda-bpm-770-alpha1-released/)

Is there anything wrong with the first approach? I’m assuming the advantage of the second approach is that you can put extra logic and handling around the call activity inside the sub process box?

Thanks,
Galen

It really depends upon your environment, performance requirements, coding style, etc.

For example, if all of your processes run within the same Camunda instance (i.e. 1 + N Camunda servers sharing a database), then the call activity method is good because it provides a “parent” process with overall control logic and a separate “child” process(es) to do the actual work. The down side is that you cannot see all of the logic of the entire “workflow” on one diagram.

The up side of having everything in one process is that you can see everything that happened in a single history diagram (at least I assume that, but I’ve never actually done this). The down side of doing everything within a single parent process (via a sub process) is that your diagram can get unwieldy.

Camunda handles most things for us and I don’t think it particularly cares which method you use. I don’t think you really take much of a hit either way because of the way Camunda processes activities.

When talking to others about Camunda, I remind them that all we doing is encoding logic. Camunda offers a wide variety of tools for doing this like BPMN, DMN, DRD/DRG, etc. The choice of which method you use should factor in both maintainability and comprehensibility. In other words, it may work but if it’s hard to maintain or to understand the logic, you should rethink your choice.

Our Camunda implementation requires us to completely decouple all processes (i.e. you may not use Call Activity except under very limited circumstances). All child processes are called via the REST API. As such, we must use different encoding choices.

1 Like

Thanks for the good answer!
Galen