Difference between Call Activity and Subprocess

hi guys.
i’m newbie. Anyone can explain difference between Call Activity and Subprocess for me ?

Purpose of both Call Activity and Subprocess help reuse diagram…

thanks for help

Hi @The_Gorilla,

“The difference is that the call activity references a process that is external to the process definition, whereas the subprocess is embedded within the original process definition. The main use case for the call activity is to have a reusable process definition that can be called from multiple other process definitions

https://docs.camunda.org/manual/latest/reference/bpmn20/subprocesses/call-activity/

Also keep in mind that “subprocess creates a new scope for events. Events that are thrown during execution of the subprocess can be caught by a boundary event on the boundary of the subprocess, thus creating a scope for that event, limited to the subprocess.”

https://docs.camunda.org/manual/latest/reference/bpmn20/subprocesses/embedded-subprocess/

4 Likes

Call Activity:

  • A call activity is used to execute another process definition as part of the current process instance.

  • The main difference between a sub-process and a call activity is that the call activity does not share context with the process instance. Process variables are explicitly mapped between the process instance and the call activity.

  • A call activity is visualized as a rounded rectangle with a thick border.

    image


SubProcess:

  • A sub process is a single activity that contains activities, gateways, and events which form a process. A sub process is completely embedded inside a parent process.

  • You can use a sub process to create a new scope for events. Events that are thrown during execution of the sub process, can be caught by Boundary events on the boundary of the sub process, creating a scope for that event limited to just the sub process.

  • Sub-processes must have the following characteristics:

    1. A sub process has exactly one none start event. No other start event types are permitted. A sub process must have at least one end event.
    2. Sequence flow cannot cross sub process boundaries.
    3. A sub-process is visualized as a rounded rectangle:
      image

In version 1.2, BPMN differentiated between embedded and reusable subprocesses by assigning an attribute to a subprocess. In version 2.0, BPMN maintains this differentiation in principle, but it is defined differently. A subprocess now is embedded intrinsically, and it can be reused only by defining it as a global subprocess, and then referencing it by means of a call activity. We therefore refer to embedded subprocesses and global subprocesses in the following.


An embedded subprocess can occur only within a parent process to which it belongs. An embedded subprocess cannot contain pools and lanes, but it can be placed within the pool or the lane of the parent process. Furthermore, an embedded subprocess may have only a none start event; start events such as messages or timers are not permitted. An embedded subprocess has essentially nothing more than a kind of delimited scope within the parent process, which may serve two goals:

  • To encapsulate complexity (as already described)
  • To formulate a “collective statement” on a part of the parent process by attaching events or placing markers. We deal with this option later.

On the other hand, global subprocesses may occur in completely different parent processes.


The loose connection also affects data transfer between the parent and the subprocess. BPMN assumes that embedded subprocesses can read all the data of the parent process directly, but an explicit assignment is required for global subprocesses to be able to read it.

7 Likes

thank you :smiley:

Hi Gorilla,
Thanks for quick reply. It works for me.
1 quick question : If we have 2 bpmn files. let’s say 1. order.bpmn 2. payment.bpmn
Can I use subprocess instead of Call activity task?

Hello @santosh_t2 ,

no you can’t. As you have modelled the called process definition seperate, you will be able to reuse it also inside other processes. You will have to use a Call Activity.

Jonathan

Hi Team,

Thanks for update.

In call activity task, I have added variables in In Mapping fields.
Like

  1. User task: having two forms. Id and Name.
  2. another user task having forms : Assess and Desc
  3. another task have : Classify and comments

I want to pass all 6 variables to another BPMN files with variable user enter Value.
Sharing screen shot to more clear.


Thanks,
Santosh