activiti表结构

homeant | 2019-04-21 14:03 浏览99

activiti表结构

表结构

流程查询

/*得到流程*/ 
SELECT
	ACT_RE_PROCDEF.ID_,
	ACT_RE_PROCDEF.NAME_,
	ACT_RE_PROCDEF.DESCRIPTION_ 
FROM
	ACT_RE_PROCDEF
	LEFT JOIN ACT_RE_DEPLOYMENT ON ACT_RE_PROCDEF.DEPLOYMENT_ID_ = ACT_RE_DEPLOYMENT.ID_ 
WHERE
	ACT_RE_PROCDEF.KEY_ = ?;

查询流程正在运行的任务

SELECT 
	art.ID_,
	art.art.EXECUTION_ID_,
	art.PROC_INST_ID_,
	art.NAME_,
	art.ASSIGNEE_,
	art.CREATE_TIME_ 
FROM 
	ACT_RU_TASK art
WHERE 
	art.PROC_DEF_ID_= ?;

查询正常运行的流程实例

SELECT
	art.ID_ TASK_ID_,
	art.EXECUTION_ID_,
	art.PROC_INST_ID_,
	art.NAME_,
	art.ASSIGNEE_,
	art.CREATE_TIME_,
	are.PARENT_ID_,
	are.PROC_DEF_ID_,
	are.ROOT_PROC_INST_ID_,
	are.ACT_ID_,
	are.START_TIME_ 
FROM
	ACT_RU_TASK art
	LEFT JOIN ACT_RU_EXECUTION are ON art.EXECUTION_ID_ = are.ID_ 
WHERE
	art.PROC_DEF_ID_ = ?;

查询流程实例变量

SELECT
	arv.ID_,
	arv.TYPE_,
	arv.NAME_,
CASE
		arv.TYPE_ 
		WHEN 'string' THEN
		arv.TEXT_ 
		WHEN 'boolean' THEN
		arv.LONG_ 
		WHEN 'integer' THEN
		arv.LONG_ ELSE '' 
	END VALUE_
	FROM
		ACT_RU_VARIABLE arv 
WHERE
	arv.EXECUTION_ID_ = ?;
select distinct RES.* from ACT_RE_PROCDEF RES WHERE RES.KEY_ = 'leave' and (RES.SUSPENSION_STATE_ = 1) order by RES.ID_ asc;
select distinct RES.* from ACT_RU_TASK RES WHERE RES.PROC_DEF_ID_ = 'leave:1:866908b5-1fb6-11e9-a502-4c348832211f' order by RES.ID_ asc;
/*查询历史流程*/
select distinct RES.* , DEF.KEY_ as PROC_DEF_KEY_, DEF.NAME_ as PROC_DEF_NAME_, DEF.VERSION_ as PROC_DEF_VERSION_, DEF.DEPLOYMENT_ID_ as DEPLOYMENT_ID_ from ACT_HI_PROCINST RES left outer join ACT_RE_PROCDEF DEF on RES.PROC_DEF_ID_ = DEF.ID_ order by RES.END_TIME_ desc;

/*查询正在运行的流程*/
select distinct RES.* from ACT_RU_TASK RES WHERE RES.ASSIGNEE_ = 'leader' and RES.TASK_DEF_KEY_ = 'dept_leave_audit' and RES.SUSPENSION_STATE_ = 1 order by RES.ID_ asc;

cloud

projectdesc
activiti-cloud-runtime-bundle-service运行时
activiti-cloud-audit-service审计
activiti-cloud-query-service查询