Choreography
The "Choreography" diagram describes the sequence of interactions of participants during the execution of business processes. Such diagrams are built in order to show even more clearly the interactions between business processes and their participants. For an initial understanding of the choreography, let's look at a simple example.
Simple choreography diagram
Below is a BPMN choreography diagram, which shows the sequence of interactions between the Patient and the Clinic during the business process of receiving a doctor and prescribing treatment.
This business process is described by four choreography interactions.
Request to the doctor
- The patient initiates the interaction and sends the initiating message "I need a doctor's appointment!" to the Clinic. The response message from the Clinic is "Come to the appointment!". Thus, this interaction is two-way, that is, during it, messages are exchanged. Please note that the initiating message and the initiator participant have a light background, while the responding message and the responding participant have a dark background.
Practical advice: the initiating message can only be sent by the initiator participant, and the response message can only be sent in response to the initiating message!
The figure below shows that you cannot attach an initiating message to the border of the responding participant, and you also cannot attach a response message to the border of the initiating participant.
-
Transmission of symptoms This interaction is one-sided. This means that only the transmission of the initiating message takes place, and there is no response message. The initiator of the interaction is the Patient: he transmits to the doctor at the Clinic the symptoms of his illness – "I feel bad..."
-
Transfer of the recipe This interaction, as well as the previous one, is one-sided. The initiator of the interaction is the Clinic. During the interaction, the initiating message "Take your prescription!" is sent.
-
Transfer of medicines The patient initiates the interaction. He presents the prescription to the pharmacist at the Clinic and thus transmits to him the initiating message "I need my medications." In response, the Patient receives medications. This is reflected in the diagram in the form of a reply message "Here are your medicines!"
For a better understanding of the choreography, here and below we present the corresponding "Interaction" diagram.
Choreography call
BPMN Choreography Call is designed to call a global (standard, reusable) task or subprocess of choreography. It is indicated by the graphical symbol of a task or subprocess in a bold frame.
Choreography tasks
BPMN choreography tasks are designed to indicate interactions between two participants in business processes (or between two business processes). They are represented as graphical objects that consist of several elements.
The tasks of BPMN choreography can be depicted in different ways, depending on the nature of the described interaction. There are only two possible options:
- Message transmission (one-way collaboration)
This type of interaction is the transmission of one message from the initiator to the second participant and is depicted as a choreography task using any of the following methods. An image with an initiating message is preferable, since in this case you can specify the name of this message.
The corresponding situation in the Interaction diagram may look different. Two possible examples are shown below: message transfer between collapsed pools and between tasks in different pools.
- Messaging (two-way collaboration)
This type of interaction is an exchange of messages between the initiator and the second participant, and is depicted as a choreography task with an initiating message and a response message.
The corresponding situation in the Interaction diagram may look different. Below are three possible examples of messaging: between two, three, and four tasks.
Messaging between two tasks
Messaging between the three tasks
Messaging between four tasks
The image of a reply message without an initiating message is an error!
Follow the correct sequence of choreography tasks!
When modeling BPMN choreography, make sure that the initiator of each subsequent task is involved in the previous task! Violating this rule is a mistake.
Markers of choreography tasks and subprocesses
Markers of tasks and subprocesses of choreography are used to indicate cycles and multiple instances of tasks and subprocesses. Let's consider the use of markers in more detail using the example of BPMN choreography tasks.
Cyclic BPMN choreography task and the corresponding fragment of the Interaction diagram. Please note that both the corresponding tasks – sending and receiving a message – must be cyclical.
Multi-instance BPMN choreography task (parallel instances) and the corresponding fragment of the "Interaction" diagram. Please note that both relevant tasks – sending and receiving messages – must be multi-instance.
Multi-instance BPMN choreography task (sequential instances) and the corresponding fragment of the "Interaction" diagram. Please note that both relevant tasks – sending and receiving messages – must be multi-instance.
The BPMN choreography task with multiple participants and the corresponding fragment of the Interaction diagram. Please note that in the interaction diagram, the pool of multiple participants should also be designated as multiple.
Markers of BPMN choreography subprocesses are designated in the same way as markers of choreography tasks and carry the same semantic meaning.
Subprocesses of choreography
A BPMN choreography subprocess is a composite choreography action that is decomposed into a stream of several child choreography tasks. The number of participants in the choreography subprocess can be from two or more. The collapsed subprocess of BPMN choreography is marked with a "+" symbol on the diagrams.
Collapsed choreography subprocess
An expanded choreography subprocess and its corresponding "Interaction" diagram
The image of a BPMN choreography subprocess with an initiating and/or responding message is an error, as it is typical only for tasks. Be careful!
Choreography events
BPMN events are used in choreography diagrams in most cases as well as in business process diagrams. The specifics of using events in BPMN choreography diagrams are shown in the tables below.
Using starting events in choreography diagrams
Type of starting event | Can I use it? | Comments |
---|---|---|
Abstract | Yes | Is used to start the choreography in all cases when the process should be started by the first initiating message. It is also used to start subprocesses of choreography. |
Message | No | - |
Timer | Yes | All participants must have an agreement on the same time for performing actions. |
Escalation | No | - |
Error | No | - |
Compensation | No | - |
Condition | Yes | Used with the usual semantics. |
Signal | Yes | The signal source does not need to be imaged. All participants in the choreography "see" the signals, because the signal does not have a specific recipient and this differs from the message. |
Using intermediate events in choreography diagrams
Type of starting event | Can I use it? | Comments |
---|---|---|
Abstract | Yes | Is used with the usual semantics to indicate a certain point reached in the process. It cannot transmit messages. |
Message | No | - |
Timer | Yes | Provided the time is synchronized between the choreography participants. |
Error | No | - |
Escalation | No | - |
Cancel | No | - |
Compensation | No | - |
Condition | Yes | Is used as a delay that waits for the data to change in order for the event to fire. The data must be visible to all participants and contained in one of the previous messages. |
Condition (boundary) | Yes | Is used only as an interrupting handler event. |
Condition (in the event gateway) | Yes | Is used as a delay that waits for the data to change in order for the event to fire. The data must be visible to all participants and contained in one of the previous messages. |
Link | None | Is used with the usual semantics. |
The | Yes | signal is used only as a handler event. |
Plural | No | - |
Using end events in choreography diagrams
Type of starting event | Can I use it? | Comments |
---|---|---|
Abstract | Yes | is used to complete the choreography, that is, to indicate the point in the choreography process after which the participants in the interaction stop sending messages and wait for any messages to be received. |
Message | No | - |
Error | No | - |
Escalation | No | - |
Cancel | No | - |
Compensation | No | - |
Signal | No | - |
Plural | No | - |
Stop (terminator) | Yes | Used with the usual semantics. |
Link to the subprocesses
There are 4 types of actions (cubes) used in choreography diagrams:
1. The Choreography Task
It represents an elementary action and displays one or more instances of messaging between participants. It is assumed that there are at least two Participants. The name of the Choreography Task and the names of the Participants are displayed in three different parts of this graphic element. Thus, graphically, the Choreography Task should be divided into tracks with the names of the participants (two or more), and also contain a track dedicated to the name of this Task. It can refer to the business process of orchestration. It cannot refer to the business process of choreography.
2. Collapsed sub-choreography
The diagram does not show the details of the Sub-choreography. The plus sign is located in the center of the lower part of the track with the Task name and indicates that this Action is a Subprocess. In this case, the details of the Choreography are at the lower level. It is not a reference to a business process. It is only a decomposition of the choreography task.
3. Expanded sub-choreography
The boundaries of Sub-choreography have been expanded. Details are visible inside the borders. It is important to note that the flow of operations cannot cross the boundaries of Sub-choreography.
3. Call choreography
Calling a different choreography process. It can refer to the business process of choreography. It cannot refer to the business process of orchestration.