BPMN2.0 specification and process engine selection scheme


Hello everyone, I am Bittao. This article mainly briefly introduces the content of the BPMN2.0 specification, allowing readers to quickly understand the main content and graphic styles covered by BPMN2.0. It also explains in detail how to draw a standard flow chart, and how to implement business process functions and technology selection at the software level.

1. Basic concepts

There are a large number of business processes in our lives, ranging from getting married and buying a house to asking for leave to buy a ticket. They all need to follow the prescribed process. If the process is relatively simple, we can draw some sketches to let everyone understand. But when the business is too complicated, if there is no specification of a business flow chart, it may be difficult for people and machines to understand. In order to unify various business flowcharts around the world, the BPMN (Business Process Model and Notation) standard has emerged, which has become one of the ISO standards ( standard download ).
History of BPMN development
BPMN2.0 mainly regulates graphics, just like UML diagrams, that is, we can understand the logic of the business flow when we see the diagrams. How the actual system realizes the control operation according to the graphics is what the workflow engine has to do. For example, the control mode in the workflow operation has to refer to Control-Flow Patterns . What needs to be emphasized is that the well-known workflow engines: Activiti, Flowable, Camunda and domestic Yanhuang Yingdong, etc., all claim to support the BPMN2.0 specification. In fact, their operating logic, attribute identification, and storage structure are roughly the same, but there are slight differences, which cannot be used across process engines. For example, the XML format of the start event conforming to the BPMN2.0 specification is generally called <startEvent>, but the internal definition of the gateway engine is not the same, and some workflow engines do not even use the XML format to store it in the JSON format. So the so-called process engine supports BPMN2.0, but the function and appearance follow the standard. Realization at the actual software level can be done according to one's own needs. For those who are first exposed to the BPMN2.0 specification, it is very important to distinguish this concept.

2. Significance of BPMN

The meaning of using graphic specifications is to make everything understandable, just like the language in our reality. In addition, in such an information age, we have too many software businesses to deal with complex processes in reality. Such as OA office system, WMS warehouse management system, TMS logistics management system, OMS, SRM, CRM order management system and so on. These business processes are usually very complex, if not constrained by specifications, we can use our own symbols to draw them. I am afraid it is easy to step on the pit, and it is not easy to form business-level standards and experience accumulation. Then through the BPMN2.0 specification, we can manage the flow chart to a great extent, risk control and compliance inspection.
insert image description here
The figure above is a simple BPMN model instance, and the process is a model of a recruitment position. According to our observation, it is not difficult to understand the meaning. Although you may not know the professional terms of each module in this diagram, you can understand what the process of this diagram is. So BPMN is still doing a good job in terms of visual understanding, which is what I admire: the best product is a product without instructions .

3. Main elements

In BMPN2.0, components are mainly divided into four categories: activities, gateways, events, and auxiliary. Here is a summary diagram of the business process model and symbol specification for your quick understanding.
insert image description here

3.1 Activities

Activities are equivalent to entities. It can be said that the entity model definition of the flow chart is mainly composed of activities. The components are shown in the figure below:
insert image description here

Task

The most commonly used activities are tasks. In order to distinguish various types of tasks, icons are usually added to the task components to illustrate:
insert image description here
there is no uniform specification for the color, style and icons of the components, and they can be adapted according to the main color of the system during development. Just keep the general shape.
insert image description here

subprocess

But our process is too complex, we need to abstract the flow chart. In this way, the minutiae and relatively independent parts can be extracted into a separate process, and then introduced in the overall process.
insert image description here

call activity

General sub-processes and tasks are part of the flowchart and cannot be used alone. In most cases, however, an activity should be reusable across multiple flowcharts. BPMN provides 调用活动constructs for this. When a global activity or sub-process is invoked, it is indicated by a thick border.
insert image description here

event subprocess

Unlike normal processes, temporal subprocesses are not triggered by sequence flows. Rather, it is a process designed by events triggered by message flow during program execution.
insert image description here

affairs

Like the transaction concept in the database, a transaction can be executed completely or not executed at all. If something goes wrong, the transaction must be rolled back.
insert image description here

3.2 Gateway

The gateway is equivalent to a business processing component, the activity (entity) is just to explain what is there, and the gateway can define its rules through the connection with the activity. The components are shown in the figure below:
insert image description here

exclusive gateway

Sequentially judge and execute the first branch that is True, other branches are not judged and not executed.
insert image description here

Inclusion Gateway

Select or combine one or more paths, such as we select multiple tags to filter the list.
insert image description here

parallel gateway

As the name suggests, a parallel gateway is a gateway that can be forked and executed in parallel.
insert image description here

event gateway

The above three gateways are data-based exclusive (XOR) gateways, but we need event gateways to take different paths for the data being processed. That is, an event-based gateway that does not route based on data, but based on what happens next. Consider a business flow where we order a pizza and wait for it to arrive. We can only eat when the pizza arrives, but what if the pizza hasn't arrived after 60 minutes? We'll make an anxious call and that's it! We can model this with an event gateway:
insert image description here

complex gateway

Complex Gateway: Complex Gateway allows custom path splitting and reclaiming algorithms according to the needs of specific business scenarios.
insert image description here

3.3 Events

Flow charts can only be used to describe static business processes, but the real world is superimposed by various uncertain factors. When a process is executed, it consumes and creates data, information, files, documents, etc. Sequence flow from one activity to another is usually accompanied by data passing. Different data will cause different events. We need to capture various events just like writing a program, so as to ensure the integrity and reliability of the system.
insert image description here
When drawing, two aspects need to be considered: the cause of the event (trigger), and the impact of the event in the flowchart.
The most commonly used events are the following three. Among them, the start event and the end event are the most critical, and they are also elements that every flow chart needs to have. Intermediate events are added as needed. It should be noted that the different symbols filled in the middle of the three event icons are used to express different meanings.
insert image description here
There are many types of events, so here is a practical example to observe:
insert image description here

start event

Conditional events are the processes that are triggered when the conditions are true; signal events refer to the monitoring of global broadcast events; multiple events refer to the combination of multiple events, as long as one of the events occurs, they will be started; parallel multiple events require all events Both have to happen for it to start.
insert image description here

end event

The default end event is an accentuated black circle, which is blank; the message event envelope symbol will be filled in black; the terminate end event is pure black, which not only deletes a single token, but terminates the entire process.
insert image description here

intermediate event

Intermediate events can send and receive signals, and are typically used in the following two situations:

  1. Trigger events in relation to other events in the process (for example, sending messages or signals);
  2. React to events in the process (for example, when a message is received or a certain point in time is reached).
    insert image description here

3.4 Auxiliary

In the BPMN2.0 specification, the most commonly used graphics are the above-mentioned activities, gateways, and events. But in order to express complex business more clearly, BPMN also proposes the use of some auxiliary components. Note: These auxiliary components are only for expressing the business model better and are not required.

connection

Different components can be associated with various line shapes, and different lines have different meanings, which can be roughly divided into the following four lines:
insert image description here

Lane diagram

As shown in the figure below, the swim lane diagram can divide different business flows into different lanes. They are similar to dividing the swimming pool into different lanes, and each competitor in the swimming competition can only swim in his own lane.
insert image description here

Notes and Groups

Annotations are mainly for supplementary illustration of the flowchart, we can apply annotations and groups in the way we like, even across pool boundaries. Annotations and groups do not affect execution semantics, so don't confuse them with subprocesses etc. Note: It can be distinguished by color.
insert image description here

data storage

When the flow chart is running, if you want to highlight the direction of its data flow, you can express it through data objects and databases.
insert image description here
The following figure shows an example of data flow:
insert image description here

Fourth, the type of graph

This section mainly introduces how to build a clear process model when faced with complex scenarios.

4.1 Arrangement diagram

When multiple companies are required to interact, such as connecting their information systems in a way that fully automates the placing and fulfillment of orders and other business transactions, each company needs to be responsible for its own processes.
insert image description here
The above picture is a collaboration diagram, but there is no way to express a more detailed expression: the events and logical order in the message flow. The arrangement diagram is to highlight the message exchange itself, as shown in the following figure:
insert image description here
the arrangement diagram is divided into three columns, and the upper and lower columns represent the participants respectively. In the example picture: the dark color is the receiver, and the white color is the initiator.

4.2 Session graph

A session graph provides an overview of which actors in an area collaborate on which tasks. In the image below, three sessions can be seen. When processing insertion orders, a client works with an advertising agency and several meal planners. On the other hand, a client and an advertising agency can work together on an advertising campaign. For this, they collaborate with several mediums. A designer can also be part of another company's activities: together with a publisher, a designer handles orders for illustrations.
insert image description here

5. Technology selection

At present, the most widely used place of BPMN2.0 is the process engine. People use the symbols stipulated by the standards to draw globally recognized flow charts. Then in its own system, it runs to realize the visualization of complex business logic. The following lists the front-end and back-end technologies needed to realize the business process, and you can choose according to your own project situation:

5.1 Front end

BPMN.JS

BPMN 2.0 rendering toolkit and web modeler. It is written in JavaScript, embeds BPMN 2.0 diagrams in the browser, and is independent of the backend, which also makes it easy to embed it in task web applications: can be used independently or integrated into your application middle.

LogicFlow

Open-sourced by Didi, LogicFlow is a flow chart editing framework that provides a series of functions necessary for flow chart interaction and editing, as well as simple and flexible node customization, plug-in and other expansion mechanisms, so that we can quickly meet the class flow in the business system graph needs. Focus on business-customized flow chart editing framework, support various diagram editing scenarios such as mind map, ER diagram, UML, workflow, etc.

AntV X6

Open sourced by Ali, X6 is a graph editing engine under AntV. Provides easy-to-use node customization capabilities and out-of-the-box interactive components, allowing us to quickly build flowcharts, DAG diagrams, ER diagrams and other diagram applications.

5.2 Background

activity

A lightweight workflow and business process management (BPM) platform for business people, developers, and system administrators. At its core is an ultra-fast and rock-solid BPMN 2 process engine for Java. It is open source and distributed under the Apache license. Activiti can be deployed in any Java application, server, or cluster.

Flowable

A compact and efficient workflow and business process management (BPM) platform for developers, system administrators, and business users. Flowable is an open-source workflow engine written in Java that can execute business processes described in BPMN 2.0. It is an actively maintained fork of Activiti.

Compileflow

compileflow is a very lightweight, high-performance, integrable, and extensible process engine. This engine is one of the Taobao workflow TBBPM engines. It is a stateless process engine that focuses on pure memory execution. It converts process files into java code for compilation and execution, which is simple and efficient. Currently, it is the process engine of multiple core systems such as Alibaba business middle-end transactions. compileflow allows developers to design their own business processes through the process editor, visualize complex business logic, and build a bridge between business designers and development engineers.

6. Summary

Finally, I would like to talk about my own thoughts on the BPMN specification: whether it is a tool or a specification. It is all to meet our actual needs. When developing and implementing, we should not be too rigid. It should be improved, optimized and expanded according to the actual situation. For example, in the BPMN specification, multiple data streams are not allowed to be connected to one activity (except for multi-pin pins), and the role of a gateway is required in the middle. But in the actual development process, when we find that there are too many gateways that affect the visualization and readability of graphics, we can use technical means to simplify and optimize related specifications. Therefore, I do not recommend following the norms for the sake of complying with the norms, but making appropriate adjustments according to the actual situation in order to develop more practical products.

Guess you like

Origin blog.csdn.net/u012558210/article/details/129342543