环境
activiti:5.22.0
springboot:2.5.1
前言
目的是通过activiti
打印的SQL日志,来分析对activiti
的操作涉及到了哪些表;
logging.level.org.activiti.engine.impl.persistence.entity=debug
如果启动项目后,你会发现,会不停的打印查询SQL日志:
#在流程引擎启动就激活AsyncExecutor,异步 true false 关闭
spring.activiti.async-executor-activate=false
模型
查询列表SQL
select distinct RES.*
from ACT_RE_MODEL RES
order by RES.ID_ asc
LIMIT ? OFFSET ?
查询模型总记录
select distinct count(RES.ID_)
from ACT_RE_MODEL RES
部署
部署列表
select distinct RES.*
from ACT_RE_DEPLOYMENT RES
order by RES.ID_ asc
LIMIT ? OFFSET ?
部署总记录数
select distinct count(RES.ID_)
from ACT_RE_DEPLOYMENT RES
编辑
select * from ACT_RE_MODEL where ID_ = ?
select * from ACT_GE_BYTEARRAY where ID_ = ?
保存并关闭
select * from ACT_RE_MODEL where ID_ = ?
update ACT_RE_MODEL set REV_ = ?, NAME_ = ?, KEY_ = ?, CATEGORY_ = ?,
LAST_UPDATE_TIME_ = ?, VERSION_ = ?, META_INFO_ = ?, DEPLOYMENT_ID_ = ?,
EDITOR_SOURCE_VALUE_ID_ = ?, EDITOR_SOURCE_EXTRA_VALUE_ID_ = ?, TENANT_ID_ = ?
where ID_ = ? and REV_ = ?
# 相关参数
Parameters: 3(Integer), hello1111(String), 12313123(String), null,
2021-06-27 23:37:31.176(Timestamp), 1(Integer),
{"name":"hello1111","revision":1,"description":"hello1111"}(String), null,
2(String), null, (String), 1(String), 2(Integer)
update ACT_GE_BYTEARRAY set REV_ = ?, BYTES_ = ? where ID_ = ? and REV_ = ?
# 相关参数
Parameters: 2(Integer), java.io.ByteArrayInputStream@3ab23bdf(ByteArrayInputStream),
#2(String), 1(Integer)
select * from ACT_GE_PROPERTY where NAME_ = ?
#相关参数
Parameters: next.dbid(String)
update ACT_GE_PROPERTY SET REV_ = ?, VALUE_ = ? where NAME_ = ? and REV_ = ?
#相关参数
Parameters: 8(Integer), 17501(String), next.dbid(String), 7(Integer)
insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_) values ( ?, 1, ?, ?, ? )
#相关参数
Parameters: 15001(String), source-extra(String), java.io.ByteArrayInputStream@3f13e622(ByteArrayInputStream), null
update ACT_RE_MODEL set REV_ = ?, NAME_ = ?, KEY_ = ?, CATEGORY_ = ?, LAST_UPDATE_TIME_ = ?, VERSION_ = ?, META_INFO_ = ?, DEPLOYMENT_ID_ = ?, EDITOR_SOURCE_VALUE_ID_ = ?, EDITOR_SOURCE_EXTRA_VALUE_ID_ = ?, TENANT_ID_ = ? where ID_ = ? and REV_ = ?
#相关参数
Parameters: 4(Integer), hello1111(String), 12313123(String), null, 2021-06-27 23:37:35.376(Timestamp), 1(Integer), {"name":"hello1111","revision":1,"description":"hello1111"}(String), null, 2(String), 15001(String), (String), 1(String), 3(Integer)
关闭编辑器
# 查询模型列表
select distinct RES.* from ACT_RE_MODEL RES order by RES.ID_ asc LIMIT ? OFFSET ?
结果:4
# 查询部署列表
select distinct RES.* from ACT_RE_DEPLOYMENT RES order by RES.ID_ asc LIMIT ? OFFSET ?
#查询模型数量
select distinct count(RES.ID_) from ACT_RE_MODEL RES
#查询部署数量
select distinct count(RES.ID_) from ACT_RE_DEPLOYMENT RES
未完。。。