BPMN Cheat Sheet

I am writing this article primarily for myself, but I think it will also be useful for beginner IT specialists. And the article will also be useful for those who need to refresh their knowledge or quickly remember the main things without opening the full manual.

What is this?

BPMN is a notation (or method, although almost everywhere they write “system”) for modeling or describing business processes. A business process is the logic or algorithm of the system's operation for a given task. Accordingly, a BPMN diagram is a diagram that describes a business process.

Such diagrams are quite easy and intuitive to read, especially if the business process developer (the one who modeled the diagram) formed it according to all the rules and standards, and also tried not to overload it with unnecessary information.

In some cases, BPMN is used to work out complex processes. This does not mean a diagram, but a process, i.e. the developer creates a process, describes all the conditions, passes the flows, etc. And there are special development environments, for example, Tibco BPM and Camunda BPM.

However, further we will talk primarily about diagrams, as this is an excellent tool for each team member, from the manager to the tester, to understand what exactly they are doing within the framework of a specific task.

What does it consist of?

Once again, I emphasize that the article is aimed more at beginners and as a basic reminder, but not as exhaustive documentation. I omit many things due to their redundancy or irrelevance (at least in my personal work).

The main elements that make up a BPMN diagram are events (blue), activities (green), gateways (red), and flows (yellow).

Basic elements

Basic elements

There are more elements in total (there are also comments, “tracks” and artifacts), but they are not so important and you can do without them, but you can’t do without the main elements.

Events(or triggers) – are used to display some event, for example, a message has arrived in a topic. Events can be starting, ending or intermediate. Starting events indicate the beginning of a process, ending events indicate its end, and intermediate events can pause the process.

Usually starting events have a thin frame, intermediate – double frame, and final bold frame:

Main types of events

Main types of events

Event Subtypes

In the second version of the notation (BPMN2.0) there are also other events, and to be precise, the starting and intermediate ones are divided into subtypes. In my practice, the events of the basic type have always been sufficient to describe a business process. Therefore, I will not dwell on subtypes, they are more needed for development in special environments like Camunda BPM.

In addition to the division into 3 main types, there is also a division into types by the nature of the event's work. The most frequently used:

Main types of events by nature of work

Main types of events by nature of work

Empty

It is most often used in the description of a “subprocess” or when the diagram designer is simply lazy))

Sometimes I do it myself, don't judge me too harshly ❤️

Message

It is used in cases when, for example, the initiator for starting a process is a new message in a topic or a request.

Timer

Almost all cases that are related to time. For example, the process is launched at 12:00 every day.

Error

An event that is most often used as a final event. Often, when describing a process, negative scenarios are also touched upon, and it is for such scenarios that an event with an error (exception) is used.

Actions(or tasks) are used to display the functions that will be performed by the program. Just as events come in several types and different in nature. But in my practice, I have come to the conclusion that to describe a business process from the point of view of analytics for an IT team, using all the action options is pointless, since often not everyone knows and understands the difference. And it also causes a slight overload, but this is my subjective opinion. Therefore, among all the actions, I constantly use only two: normal and “subprocess”.

Basic types of actions

Basic types of actions

Normal

A regular action is used to describe an activity that cannot be broken down in any way (at least that's how I use it).

Subprocess

This action is used when it is necessary to introduce another process (which, for example, has already been described) into the described process as its part, or for further decomposition of the action. You can get acquainted with the use of such an action further in the chapter with examples – “DIY News Feed”.

Gateways – these are elements that are used to introduce forks, various conditions or additional logic into the process. Three types of gateways are most often used: “exclusive OR”, “AND” and “inclusive OR”. In essence, they work like their operators of the same name. Again, there are many more types, especially in BPMN2.0, but these three are almost always used (at least by me and I don’t get unnecessary questions from my colleagues).

Main types of gateways

Main types of gateways

“Exclusive OR”

Such a gateway is required to split the execution of a process into one of the options. That is, in essence, it works as a choice, and either one branch or the other is executed in the process. Examples of thread splitting:

Example 1

Example 1

Example 2

Example 2

“AND”

The “AND” gateway is used to parallelize a process into two branches. Accordingly, in a process with such a gateway, both branches will be executed simultaneously. Examples of thread division:

Example 1

Example 1

Example 2

Example 2

“Inclusive OR”

This gateway essentially combines the functions of the two described above. When using it, the process execution can either be parallelized into all branches or split into specific ones that satisfy the condition.

Example with an “inclusive OR” gateway

Example with an “inclusive OR” gateway

Examples of stream splitting:

Example

Example

It is very important to note how the process execution “token” moves along the flow and what nuances there are. This NOTwill help at the interview (and maybe it will help), but will allow you to clearly and consciously understand the work of the gateways, how to do it NECESSARYas possible, but NOT WORTH ITand how exactly IT IS FORBIDDEN.

How to do it right (shown in examples under each gateway)

It is more correct to use opening and closing gateways of the same type, and also not to use a closing gateway immediately under the opening of new branches. This is necessary to improve readability and eliminate various errors (more about them later).

How NOT to do it

I would not recommend combining different gateways when opening branches and merging them, as this can confuse the person who will be viewing your process. Also, such a combination of different gateways can lead to incorrect operation. In the example below, action number 4 will be executed twice, although the process was started once. This happens because the process uses the “AND” gateway as an opening one, and it parallelizes the flows, and the “OR” gateway closes the branches, which does not collect the flows together.

You SHOULD NOT do this

You SHOULD NOT do this

This process will work. Perhaps, in some cases, such an algorithm of work may even be useful. Therefore, this is not an error, it is possible to do so, but I would not recommend it, at least due to the decrease in readability of the logic of the process execution. If you need to make it so that some action is performed twice in the algorithm, then it is better to split this action and add it to each branch. In this form, the process will be clearer and there will be fewer questions about it.

What NOT to do

Here we are also talking about a combination of different gateways. In the example below, action number 4 will never be executed, and the process itself will never be completed. This will happen because “AND” is selected as the closing gateway, which expects tokens from both branches to continue the process, and there will never be any. Combining gateways in this format is a gross error.

This is NOT POSSIBLE to do

This is NOT POSSIBLE to do

Streams – everything is very simple here, it is an arrow that displays the sequence of actions in the process.

Paths – these elements are optional, but I personally use them quite often in my practice to display the division into microservices, as well as interactions with adjacent systems. The track is a signed rectangle, inside which the elements that are executed within or involved in the microservice/system are placed. An example will make everything clearer.

Example with paths

In this example, using lanes, the process is decomposed into individual microservices of the system in which it is located.[процесс] are being carried out.

Example with paths

Example with paths

Where and how to use?

There are quite a few options where and how you can use the notation, these can be the above-mentioned Tibco BPM, Camunda BPM or tools such as ARIS, draw.io etc. I will not dwell on this in more detail here, since it largely depends on the company you work for. Either they provide you with special software for designing business processes, or they do not. In my practice, I prefer draw.ioas it is universal and can be used almost anywhere. Moreover, it can be either a plugin built into everyone's favorite (or not) Confluence, or a plugin built into your favorite IDE. By the way, when using an IDE, the mighty “docs-as-code” opens up before us.

When using the plugin draw.io in Confluence the work looks the same as when working directly on the resource itself. A small example of work in draw.io you can see in my article on sequence diagram.

To install the plugin in your IDE, in my case it's WebStorm from JetBrains, you can follow the guide in the pictures below:

Management

Go to the settings in the Plugins menu, then find the “Diagrams.net Integration” plugin in the MarketPlace tab and install it:

Installing the plugin

Installing the plugin

After installing the plugin, you will be able to create a file in a format understandable for draw.io:

DIY News Feed

Let's try to design a business process together that is close to work tasks. Let's assume that we have a goal to design an algorithm for the interaction of a browser with the application backend. It is necessary to describe the process of providing the user with a news feed based on friends' posts and recommendations.

Please note that all new elements are highlighted in green for clarity.

We have a simple process consisting of a start event, a finish event and four actions:

  1. Search for friends and interests;

  2. Selection of new posts from friends and recommendations;

  3. Cutting off unnecessary records;

  4. Sort records by relevance.

Now I suggest improving our process, we can do this by adding the “Message” types, which display the received request and the sent response. We also add another action for clarity, that we are forming a response and returning it. The result of the improvement:

Let's add request processing:

In addition to the new action with request processing, which can include request body validation, data validation, etc., a new branch has been added, which is expanded using an exclusive gateway. In the new branch, we have added an action with error fixation and a new event with an error.

Now I suggest improving it a little more:

In the new version of the process, we decomposed the actions into separate branches and added additional conditions.

And the last improvement, let's assume that our backend architecture consists of microservices. In this case, it will be more convenient to distribute all events and actions into their own “tracks”. Each track will be a block with a specific microservice:

Now it has become clearer where and what is happening in our breakdown into separate services, but the product owner came and asked to add a new piece of logic – adding ads to the feed and described a certain logic of the process. In order to carefully implement this piece into our process, we can single it out as a separate subprocess. And the algorithm itself can be described in a separate diagram:

Conclusion

BPMN is a powerful tool that I personally, as a systems analyst, use in my work almost every day. If I do not design a business process myself, then at least I study the documentation of related companies. I highly recommend every analyst, as well as everyone involved in development, to master this business.

I hope that in the form of a humorous practice I managed to convey the meaning and principle of creating business processes, if not, then I am waiting for your questions in the comments.

By the way, I have a Telegram channel An ordinary IT specialistwhere I share my experience and knowledge of the IT industry. The best support is a subscription to my channel ❤️

I also recommend taking a look at my article on sequence diagrams. I'm sure everyone will find something new in it.

P.S. There are probably some features I forgot to mention or didn't even know about. Share in the comments if you use anything else that I didn't cover in this article. If there is something useful, I will definitely add it and also list you as a co-author.

All the best!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *