🔹 1. ACT_HI_TASKINST
(from Activiti)
Meaning: Stores history of user tasks (e.g., approvals, actions) that were already executed in a process.
Key Fields (typical):
Field | Description |
---|---|
ID_ | Task instance ID |
PROC_INST_ID_ | Process instance ID |
TASK_DEF_KEY_ | Task definition key from BPMN |
ASSIGNEE_ | User assigned |
NAME_ | Task name |
START_TIME_ | When task started |
END_TIME_ | When task ended |
DURATION_ | Time taken |
🔹 2. t_proc_info
(custom / business-specific table)
Meaning: Stores business process instance info (e.g., order approval, contract signing). It links the business entity to the process engine instance (like ACT_HI_PROCINST
).
Key Fields (typical):
Field | Description |
---|---|
id | Primary key |
biz_id | Business ID (e.g., order ID) |
proc_inst_id | Link to Activiti's PROC_INST_ID_ |
status | Current process status |
start_user | Who started the process |
🔹 3. t_node_hi_info
(custom / business-specific table)
Meaning: Stores node-level task history in more detail or with custom business data (e.g., opinions, comments, special fields beyond Activiti’s standard ACT_HI_TASKINST
).
Key Fields (typical):
Field | Description |
---|---|
id | Primary key |
proc_inst_id | Process instance ID |
task_id | Task ID (from ACT_HI_TASKINST.ID_ ) |
node_key | Task definition key (TASK_DEF_KEY_ ) |
assignee | User who handled the task |
comment | Approval comment |
result | Pass / Reject, etc. |
end_time | Task completion time |
🔄 How They Work Together (Example)
Let’s assume someone submits a Leave Application:
Step 1: Start Process
-
A new row is inserted into
t_proc_info
:
id = 1001, biz_id = 'leave_2024_001', proc_inst_id = 'proc_abc123', status = 'running'
Step 2: Approver1 reviews task
-
Activiti inserts a row into
ACT_HI_TASKINST
:
ID_ = 'task_xyz111', PROC_INST_ID_ = 'proc_abc123', ASSIGNEE_ = 'manager1', NAME_ = 'Manager Approval'
-
Your system inserts a row into
t_node_hi_info
:
task_id = 'task_xyz111', proc_inst_id = 'proc_abc123', assignee = 'manager1', comment = 'Looks good', result = 'approved'
🧩 Visualization
[ t_proc_info ] biz_id = leave_2024_001 proc_inst_id = proc_abc123 │
▼
[ ACT_HI_TASKINST ] ID_ = task_xyz111 PROC_INST_ID_ = proc_abc123 ASSIGNEE_ = manager1 │
▼ [ t_node_hi_info ] task_id = task_xyz111 comment = 'Looks good' result = 'approved'
✅ Use Cases
Table | Purpose |
---|---|
ACT_HI_TASKINST | Technical task history (standard BPM data) |
t_proc_info | Business-level tracking of process instances |
t_node_hi_info | Detailed/custom task node information |