Workflow is the automatic execution and management of business processes through computers. It mainly addresses "the process of automatically transferring documents, information or tasks among multiple participants according to some predefined rules, so as to achieve an expected business goal or promote the realization of this goal".

Activiti is a workflow engine. Activiti can extract complex business processes from the business system, and use a special modeling language (BPMN2.0) to define them. The business system executes according to the predefined processes, realizing that the business processes of the business system are managed by Activiti, It reduces the workload of system upgrading and transformation due to process changes in the business system, thus improving the robustness of the system and reducing the cost of system development and maintenance.

Current mainstream workflow framework:
Activiti、Flowable、FixFlow、Camunda

Bi Design plans to build a project based on the latest version of Activiti7 workflow+Springboot, and records some common problems:

1. After Springboot integrates Activiti7, the database only generates 17 tables without history tables.
Solution: Because Springboot integrated Activiti7 does not enable the generation of history tables by default. So we need to add the following configuration in application.yml to generate the history table;

 spring: datasource: url: jdbc: mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT username : root password : lcry driver-class-name: com.mysql.jdbc. Driver activiti: Db history used: true # Start database history History level: audit # default level

2. About the databaseSchemaUpdate parameter in processEngineConfiguration, this parameter involves the processing strategy of the Activiti data table
The specific parameter information is as follows:

 False (default): Check the database table version and the dependent database version, and throw an exception if the version does not match. True: When building the process engine, check and update if necessary. If the table does not exist, create it. Create drop: create database tables when building the process engine, and delete these tables when closing the process engine. Drop create: delete the table before creating it. Create: create database tables when building the process engine, and do not delete these tables when closing the process engine.

3. View Activiti system default sql statement print log information
Solution: Configure the log level in the logback.xml log:
<logger name="org.activiti.engine.impl.persistence.entity" level="trace"/>

Reference link: https://blog.csdn.net/a5537489/article/details/89437217