Article source hosting: github.com/OUYANGSIHAI… Welcome star!!

Activiti introduction

Activiti5 is a business Process Management (BPM) framework released by Alfresco software on May 17, 2010. It is an open source, flexible and extensible executable process language framework covering business process management, workflow, service collaboration and other fields. Activiti is based on an Apache-licensed open source BPM platform, founded by Tom Baeyens, project architect for JBoss jBPM, and features An Eclipse plug-in that allows developers to draw business flow diagrams directly.

  • Website: www.activiti.org/

  • Download: www.activiti.org/download.ht…

At present, Version 5.22 of Activiti5 is the most commonly used version, which is also used in this tutorial. The latest version is version 7.0.

Before starting the tutorial, we need to clarify the following concepts and knowledge to help us better understand workflow development.

Workflow engine

The ProcessEngine object, which is the heart of Activiti’s work. Responsible for generating various instances and data of the process runtime, monitoring and managing the process operation.

In baidu’s more popular words: it is a car engine, just like a car, the appearance is beautiful, if the engine has problems, it is just a decoration. The elasticity of the application system is like the performance in terms of engine speed. It takes an hour to accelerate to 100km (business process changes require six months of programming modification). Can you call a good car? Do you dare to drive a car whose engine often stalls (the program gets stuck in an endless loop due to logic problems)?

Third, BPMN

In Activiti workflow, a BPMN file is used to describe the basic symbols of a business process. The components can be used to form a business flow chart. The entire business is based on this diagram.

The following is a diagram of the BPMN component

Iv. Database

When we do business process development, there is a lot of data generated, so where is the data stored?

Yeah, it’s actually in the database.

At the back of the Activiti workflow are databases, all of which start with ACT_. Using these tables, you can save data for the entire business process and use that data to develop different businesses.

The database represents the intent

Here are some basic explanations for these tables, which you can skip until you come back to them later in the tutorial and see how simple they are.

  • Resource library flow rule table

1) ACT_RE_Deployment deployment information table 2) ACT_RE_MODEL Process design model deployment Table 3) ACT_RE_procdef process definition data table

  • Runtime database tables

2) Act_ru_identitylink Runtime Process Personnel list, 3) ACT_ru_task Run-time task node table 4) ACT_ru_variable Run-time process variable data table

  • Historical database table

3) ACT_HI_comment 4) ACT_HI_identitylink historical process personnel 5) ACT_hi_detail 6) ACT_HI_procinst Historical process instance table 7) ACT_HI_TASKINst Historical task instance table 8) ACT_HI_VARinst historical change table

  • Organization List

1) ACT_ID_group User group information 2) ACT_ID_info User extended information 3) ACT_ID_membership Information about users and user groups 4) ACT_ID_user user information table

These tables are used sparingly, because we usually do our own permissions, so we don’t use activiti’s own tables.

  • General data sheet

1) ACT_GE_bytearray binary data table 2) ACT_GE_property data table stores the entire process engine level data. When initializes the table structure, three records are inserted by default.

The data of these two tables cannot be deleted at will. Deletion may cause problems.

Five, the summary

The concept of workflow is introduced so much, more go to the official website to view, the next section will use a starting example to explain workflow.

If there are any improper articles, please correct them. If you like reading on wechat, you can also follow my wechat official account: Learn Java well and get quality learning resources.