# When to use "call activity" or "messages" in BPMN processes

**URL:** <https://community.ofelia.com/t/when-to-use-call-activity-or-messages-in-bpmn-processes/12199>\
**Category:** Blog\
**Created:** [22 October 2020 13:05 UTC](https://community.ofelia.com/t/when-to-use-call-activity-or-messages-in-bpmn-processes/12199 "2020-10-22T13:05:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [22 October 2020 13:05 UTC](https://community.ofelia.com/t/when-to-use-call-activity-or-messages-in-bpmn-processes/12199/1 "2020-10-22T13:05:06Z")

</div>

When you design a process, BPMN elements such as call activities or BPM messages are useful to instantiate other processes, perform tasks in other processes, and so on.

These two kinds of BPMN elements are available in the Bonita Studio palette:

- [Call activity](https://documentation.bonitasoft.com/bonita/7.11/diagram-tasks)&nbsp; ![](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/1X/061bfb7e52716c77074d23621f0a7f9c6b8a87c2.png)
- [Messages](https://documentation.bonitasoft.com/bonita/7.11/events#toc2) ![](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/1X/fa4c271fe4ef9362770b33e57be4bbf15c017faf.png)

But when should you use a call activity vs a BPM message?

### Both elements are used to communicate between processes, but in different ways.

A _call activity_ **calls and instantiates** another process and the parent process will continue **only when the other process is finished**.  
The process initiator in this case is the **system user**. Actors will only be defined to identify who will do tasks in the called process.

 ![](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/1X/3b783a691d6c92e5ec89d54fe711b2c9d768a864.jpeg)

_Messages_ allow **asynchronous** point-to-point communication between two different pools. To identify messages to each other, you will use **key-based**  **correlations**.

Data can be mapped using both elements:

- to share data between parent and child process in call activities, by direct mapping or contracts.
- through the sending task or throw message event, by mapping the message content in the catch message event with&nbsp;process variables.&nbsp;

### Call activity is key to readability, maintainability and reusability.

- Using call activity to push standardized sequences to child processes facilitates the **readability** of the parent processes.
- It is **easier to maintain** because if you don't specify the version of your called process, Bonita will automatically select the last deployed version.
- The called processes can be made mutual, and called by several processes, making them **reusable**. You can create a collection of standard processes or sequences to be called from parent processes.

### Messages make it simple to communicate between any processes in a case.

As the communication is **asynchronous** , there is no need to return to the main process.

Messages can be **used at any time** in the process flow, to instantiate or end processes, and also within the process&nbsp;to define synchronization points.

### ![](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/1X/1742d23012e4397ab2c3da40cef65679dac4329b.jpeg)&nbsp;And keep in mind...

#### Call activity

- Only use a call activity&nbsp;when a sequence can't be easily included in the parent process, as you will have to duplicate variables and create a new process instance.
- Remember to remove the initiator of the called process if you want to prevent any end-user to initiate the process and only grant this action to the call activity.

#### Messages&nbsp;

- Messages don't expire. Make sure they are **consumed** and you don't have any pending messages related to future correlations.
- A message **IS NOT an email**!
- **Documents cannot be transmitted** by message (you will have to use documentId or documentURL instead).
