Activiti5.16.4 database table structure and activiti database structure
I. ACTIVITI database E-R diagram (5.16.4)
Activiti 5.16.4 has a total of 24 tables, including act_evt_log (Event Log) and SasS support.
Add the TENANT_ID _ (Tenant ID) field to the process definition, running instance, and history tables.
To facilitate a holistic understanding of ACTIVITI database design, I made a E-R Diagram Based on its data table.
(The image is relatively large. You can right-click to copy the image URL and open it on a separate tab)
ACTIVITI data table naming is very standard. It is also described in the help document of Activiti. You can view the chinese user manual of ACTIVITI 5.16:
Http://www.mossle.com/docs/activiti/
All Activiti tables useACT _. The second part is the two letter ID that indicates the purpose of the table. The purpose also corresponds to the Service API.
- ACT_RE _*: 'Re' indicates repository. Tables with this prefix contain process definitions and static process resources (images, rules, and so on ).
- ACT_RU _*: 'Ru 'indicates runtime. These running tables include process instances, tasks, variables, asynchronous tasks, and other running data. Activiti only saves the data during the execution of the Process instance and deletes the records at the end of the process. In this way, the running table can be kept small and fast.
- ACT_ID _*: 'Id' indicates identity. These tables contain identity information, such as users and groups.
- ACT_HI _*: 'Hi' indicates history. These tables contain historical data, such as historical process instances, variables, and tasks.
- ACT_GE _*: Common Data, used in different scenarios.
- ACT_EVT _*: EVT indicates the EVENT. Currently, there is only one table named "ACT_EVT_LOG", which stores EVENT processing logs for the Administrator to track and process events.
Ii. Overall ACTIVITI database physical diagram (5.16.4)
Iii. ACTIVITI database process definition (three tables)
Iv. ACTIVITI database process instance (seven tables)
5. Global settings of ACTIVITI database process (two tables)
Vi. ACTIVITI database process history section (eight tables)
VII. ACTIVITI database Process participants (four tables)
8. Key Fields
ACTIVITI tables have a high field repetition rate. Generally, after several tables are identified, the rest are similar.
##Public field:
-
REV _ optimistic lock version. Most ACT tables have this field to ensure the uniqueness of operations. When multiple users modify the same record,
The obtained REV _ is the same, but one of the users saves it. This is REV _, And the other users save it because REV _
It has expired and cannot be modified.
-
PROC_DEF_ID _ process definition ID
-
PROC_INST_ID _ process instance ID
-
TASK_ID _ node instance ID (or task instance ID)
-
EXECUTION_ID _ execution instance ID.
Difference between TASK and EXECUTION:
TASK to-do TASK; EXECUTION route.
Each TASK always corresponds to one EXECUTION, but EXECUTION does not necessarily correspond to one TASK. EXECUTION is the EXECUTION route of the branch.
-
ACT_ID _: node ID (that is, the node name in bpmn. xml, such as userTask1)
-
TENANT_ID _: Tenant ID, which supports data on the SaaS platform.
-
FORM_KEY _: form business key, indicating the forms associated with the process instance and task instance.
-
OWNER _: OWNER of the task
-
ASSIGNEE _: the receiver, agent, and trustee of the task.
# Special fields of the specified table:
-
ACT_HI_COMMENT.TYPE _ (type ):
Action type. The value is one of the following:
AddUserLink, DeleteUserLink, AddGroupLink, DeleteGroupLink, AddComment, AddAttachment, and DeleteAttachment
-
ACT_HI_DETAIL.TYPE _ (type)
FormProperty, // specially stores form variables
-
ACT_HI_VARINST.TYPE _ (type)
VariableUpdate // specifically stores process variable parameters
-
VAR_TYPE _ data type of multiple tables
Jpa-entity, boolean, bytes, serializable (serializable), custom type (based on your own configuration ),
CustomVariableType, date, double, integer, long, null, short, string
-
ACT_RU_IDENTITYLINK.TYPE _ (participant type)
Assignee, candidate, owner, starter, and participant
-
ACT_RU_TASK.DELEGATION _ (delegate type)
PENDING, RESOLVED. Blank if no delegation is required