The author | shenzhanwang | Tony *

Source: gitee.com/shenzhanwan…

Today, the main recommendation of two workflow springboot project, the open source project has specific deployment operation documents, core table structure description, can help understand the principle of workflow, in fact, huawei Ali inside the workflow although known as self-development (many are reference to open source), with the principle of open source workflow.

Work outflow problem is relatively high frequency configuration low-level problems, such as less than a symbol or case is not standard, do not ask me how to know (play workflow for several years), workflow play familiar, development efficiency is extremely fast.

  • Spring-boot-activiti
  • RuoYi-vue 4.x + flowable

1, Spring – the boot – activiti

Workflow engine is an indispensable tool in developing ERP system and OA system. This project aims to integrate Activiti, a popular workflow engine in the industry, based on the platform of Spring Boot, and establishes two complete workflows for demonstration: leave OA and procurement process.

It contains the following:

  1. Instead of using activiti’s built-in user and role functions, because they are too simple, it implements a three-level structure of users, roles, and permissions. The mapping between users and roles and roles and permissions is many-to-many. The persistence layer framework uses mybatis collection and Association tags nested implementation;

  2. After logging in with the default user (user name Xiaomi, password 1234), you can see two deployed processes, OA for leave and procurement process. OA for leave includes user task, exclusive gateway and start and end event, which is relatively simple. In addition, the procurement process also uses the use of abnormal end events, sub-processes and boundary events;

  3. The two processes both contain the functions of receiving to-do tasks, tracking the progress of the running process and viewing the history record of the finished running process. The progress of the running process is marked in red in the flow chart. wang

  4. In use, the process data and business data are separated, and the businessKey is used to establish a bridge connecting the process data and business data so that they can be accessed each other. The primary key of business data is the business number.

  5. All forms in the system use ordinary forms, instead of Activiti’s dynamic forms and external forms, in order to store business data and process data in separate tables.

  6. The front-end of the system is built with devoops template based on Bootstrap.

  7. Starting page entry: http://localhost:8888/login before use, compile (can be directly done in myeclipse) :

mvn clean install
Copy the code

8. Swagger portal: http://localhost:8888/swagger-ui.html

  1. Added flowchart designer, willactiviti-explorer.warAdd it to the Webapps directory of Tomcat8.5, start Tomcat, and accesshttp://localhost:8080/activiti-explorerEnter the login page with the username and password kermit:

Click Flow -> Flow Design Workspace -> New model, fill in the model name, and click Create button to start flowchart design:

After designing, you can export the source file:

  1. Added the dynamic menu permission to assign different roles to different users so that they can see different menus.

  2. Leave process is directly assigned to the specific approver, only the designated approver can approve. Procurement process according to the candidate group to sign for the task, as long as you can have the relevant menu [permission] can be approved.

  3. Effect:

2. ruoyi-vue 4.x + flowable

Ruoyi-vue 4. X + Flowable 6.5 workflow management ~

I have always wanted to learn and get started with Flowable, during which a lot of baidu oriented programming has solved a lot of problems. Thanks to the Flowable elementary user manual, zero-based learning is well worth a look. Finally, thanks to Ruoyi framework, rapid integration development cool to fly ~~~

Demo address

Visit http://139.155.16.243/

Using document: www.yuque.com/u1024153/ic…

In order to facilitate the experience, please do not delete or change the initialization of several processes and forms, thank you! There are other processes to implement, please define your own new processes, forms.

project

  • The front end adopts Vue and Element UI.
  • The backend uses Spring Boot, Spring Security, Redis & Jwt.
  • Authorization authentication using Jwt, support multi-terminal authentication system.
  • Supports loading dynamic permission menu, easy permission control in multiple ways.
  • High efficiency development, the use of code generator can be a key to generate back and forth code.

The built-in function

  • Process design
  • Form the configuration
  • The process by
  • Circulation processing

Reference documentation

Document address: doc.ruoyi. VIP

Demo figure

The project address

  • Gitee.com/shenzhanwan…
  • Gitee.com/tony2y/RuoY…