Activiti工作流(一)

基本操作对应的数据库操作

一. 流程部署

1.1、select * from ACT_GE_PROPERTY where NAME_ = ?
Parameters: next.dbid(String)
1.2、update ACT_GE_PROPERTY SET REV_ = ?, VALUE_ = ? where NAME_ = ? and REV_ = ?
     Parameters: 2(Integer), 2501(String), next.dbid(String), 1(Integer)
1.3、select * from ACT_RE_PROCDEF where KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null) and VERSION_ = (select max(VERSION_) from ACT_RE_PROCDEF where KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null))
     Parameters: myProcess(String), myProcess(String)
1.4、select J.* from ACT_RU_TIMER_JOB J inner join ACT_RE_PROCDEF P on J.PROC_DEF_ID_ = P.ID_ where J.HANDLER_TYPE_ = ? and P.KEY_ = ? and (P.TENANT_ID_ = '' or P.TENANT_ID_ is null)
     Parameters: timer-start-event(String), myProcess(String)
1.5、select * from ACT_PROCDEF_INFO where PROC_DEF_ID_ = ?
     Parameters: myProcess:1:4(String)
1.6、insert into ACT_RE_PROCDEF(ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_ , SUSPENSION_STATE_, TENANT_ID_, ENGINE_VERSION_) values (?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: myProcess:1:4(String), http://www.activiti.org/test(String), My process(String), myProcess(String), 1(Integer), 1(String), processes/MyProcess.bpmn(String), processes/MyProcess.myProcess.png(String), null, false(Boolean), true(Boolean), 1(Integer), (String), null
1.7、insert into ACT_RE_DEPLOYMENT(ID_, NAME_, CATEGORY_, KEY_, TENANT_ID_, DEPLOY_TIME_, ENGINE_VERSION_) values(?, ?, ?, ?, ?, ?, ?)
      Parameters: 1(String), 出差报销流程(String), null, null, (String), 2018-08-29 22:43:14.916(Timestamp), null
1.9、INSERT INTO ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) VALUES (?, 1, ?, ?, ?, ?) , (?, 1, ?, ?, ?, ?)
    Parameters: 2(String), processes/MyProcess.bpmn(String), java.io.ByteArrayInputStream@184bb873(ByteArrayInputStream), 1(String), false(Boolean), 3(String), processes/MyProcess.myProcess.png(String), java.io.ByteArrayInputStream@696ce057(ByteArrayInputStream), 1(String), true(Boolean)

二. 启动流程

2.1 、select * from ACT_RE_PROCDEF where KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null) and VERSION_ = (select max(VERSION_) from ACT_RE_PROCDEF where KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null))
Parameters: myProcess(String), myProcess(String)
2.2、select * from ACT_RE_DEPLOYMENT where ID_ = ?
Parameters: 1(String)
2.3、select * from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = ? order by NAME_ asc
Parameters: 1(String)
2.4、select * from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? and KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null)
    Parameters: 1(String), myProcess(String)
2.5、select * from ACT_PROCDEF_INFO where PROC_DEF_ID_ = ?
    Parameters: myProcess:1:4(String)
2.6、select * from ACT_GE_PROPERTY where NAME_ = ?
    Parameters: next.dbid(String)
2.7、update ACT_GE_PROPERTY SET REV_ = ?, VALUE_ = ? where NAME_ = ? and REV_ = ?
    Parameters: 3(Integer), 5001(String), next.dbid(String), 2(Integer)
2.8、insert into ACT_HI_TASKINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, OWNER_, ASSIGNEE_, START_TIME_, CLAIM_TIME_, END_TIME_, DURATION_, DELETE_REASON_, TASK_DEF_KEY_, FORM_KEY_, PRIORITY_, DUE_DATE_, CATEGORY_, TENANT_ID_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    Parameters: 2505(String), myProcess:1:4(String), 2501(String), 2502(String), 出差费用申报(String), null, null, null, 小0(String), 2018-08-29 23:15:34.888(Timestamp), null, null, null, null, usertask1(String), null, 50(Integer), null, null, (String)
2.9、insert into ACT_HI_PROCINST ( ID_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_ID_, START_TIME_, END_TIME_, DURATION_, START_USER_ID_, START_ACT_ID_, END_ACT_ID_, SUPER_PROCESS_INSTANCE_ID_, DELETE_REASON_, TENANT_ID_, NAME_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    Parameters: 2501(String), 2501(String), null, myProcess:1:4(String), 2018-08-29 23:15:34.81(Timestamp), null, null, null, startevent1(String), null, null, null, (String), null
2.10、insert into ACT_HI_ACTINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, ACT_ID_, TASK_ID_, CALL_PROC_INST_ID_, ACT_NAME_, ACT_TYPE_, ASSIGNEE_, START_TIME_, END_TIME_, DURATION_, DELETE_REASON_, TENANT_ID_ ) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) , (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    Parameters: 2503(String), myProcess:1:4(String), 2501(String), 2502(String), startevent1(String), null, null, Start(String), startEvent(String), null, 2018-08-29 23:15:34.859(Timestamp), 2018-08-29 23:15:34.863(Timestamp), 4(Long), null, (String), 2504(String), myProcess:1:4(String), 2501(String), 2502(String), usertask1(String), 2505(String), null, 出差费用申报(String), userTask(String), 小0(String), 2018-08-29 23:15:34.865(Timestamp), null, null, null, (String)
2.11、insert into ACT_HI_IDENTITYLINK (ID_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_, PROC_INST_ID_) values (?, ?, ?, ?, ?, ?)
    Parameters: 2506(String), participant(String), 小0(String), null, null, 2501(String)
2.12、insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, IS_MI_ROOT_, PARENT_ID_, SUPER_EXEC_, ROOT_PROC_INST_ID_, SUSPENSION_STATE_, TENANT_ID_, NAME_, START_TIME_, START_USER_ID_, IS_COUNT_ENABLED_, EVT_SUBSCR_COUNT_, TASK_COUNT_, JOB_COUNT_, TIMER_JOB_COUNT_, SUSP_JOB_COUNT_, DEADLETTER_JOB_COUNT_, VAR_COUNT_, ID_LINK_COUNT_) values (?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) , (?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
 Parameters: 2501(String), 2501(String), null, myProcess:1:4(String), null, true(Boolean), false(Boolean), true(Boolean), false(Boolean), false(Boolean), null, null, 2501(String), 1(Integer), (String), null, 2018-08-29 23:15:34.81(Timestamp), null, false(Boolean), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 2502(String), 2501(String), null, myProcess:1:4(String), usertask1(String), true(Boolean), false(Boolean), false(Boolean), false(Boolean), false(Boolean), 2501(String), null, 2501(String), 1(Integer), (String), null, 2018-08-29 23:15:34.856(Timestamp), null, false(Boolean), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer)
2.13、insert into ACT_RU_TASK (ID_, REV_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_, CLAIM_TIME_) values (?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    Parameters: 2505(String), 出差费用申报(String), null, null, 50(Integer), 2018-08-29 23:15:34.865(Timestamp), null, 小0(String), null, 2502(String), 2501(String), myProcess:1:4(String), usertask1(String), null, null, 1(Integer), (String), null, null
2.14、insert into ACT_RU_IDENTITYLINK (ID_, REV_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_, PROC_INST_ID_, PROC_DEF_ID_) values (?, 1, ?, ?, ?, ?, ?, ?)
    Parameters: 2506(String), participant(String), 小0(String), null, null, 2501(String), null

三. 查询个人任务

3.1、select g.* from ACT_ID_GROUP g, ACT_ID_MEMBERSHIP membership where g.ID_ = membership.GROUP_ID_ and membership.USER_ID_ = ?
Parameters: 小0(String)
3.2、select distinct RES.* from ACT_RU_TASK RES left join ACT_RU_IDENTITYLINK I on I.TASK_ID_ = RES.ID_ WHERE (RES.ASSIGNEE_ = ? or (RES.ASSIGNEE_ is null and I.TYPE_ = 'candidate' and (I.USER_ID_ = ? ))) order by RES.ID_ asc LIMIT ? OFFSET ?
    Parameters: 小0(String), 小0(String), 2147483647(Integer), 0(Integer)

四. 完成个人任务

4.1、select * from ACT_RU_TASK where ID_ = ?
    Parameters: 2505(String)
4.2、 select * from ACT_RE_PROCDEF where ID_ = ?
    Parameters: myProcess:1:4(String)
4.3、select * from ACT_RE_DEPLOYMENT where ID_ = ?
    Parameters: 1(String)
4.4、select * from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = ? order by NAME_ asc
    Parameters: 1(String)
4.5、select * from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? and KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null)
    Parameters: 1(String), myProcess(String)
4.6、select * from ACT_PROCDEF_INFO where PROC_DEF_ID_ = ?
    Parameters: myProcess:1:4(String)
4.7、select * from ACT_RU_TASK where PARENT_TASK_ID_ = ?
    Parameters: 2505(String)
4.8、select * from ACT_RU_IDENTITYLINK where TASK_ID_ = ?
    Parameters: 2505(String)
4.9、select * from ACT_RU_VARIABLE where TASK_ID_ = ?
    Parameters: 2505(String)
4.10、select * from ACT_HI_TASKINST where ID_ = ?
    Parameters: 2505(String)
4.11、select * from ACT_RU_EXECUTION where ID_ = ?
    Parameters: 2502(String)
4.12、select distinct T.* from ACT_RU_TASK T where T.EXECUTION_ID_ = ?
    Parameters: 2502(String)
4.13、select * from ACT_HI_ACTINST RES where EXECUTION_ID_ = ? and ACT_ID_ = ? and END_TIME_ is null
    Parameters: 2502(String), usertask1(String)
4.14、select * from ACT_GE_PROPERTY where NAME_ = ?
    Parameters: next.dbid(String)
4.15、update ACT_GE_PROPERTY SET REV_ = ?, VALUE_ = ? where NAME_ = ? and REV_ = ?
    Parameters: 4(Integer), 7501(String), next.dbid(String), 3(Integer)
4.16、select * from ACT_RU_EXECUTION where ID_ = ?
    Parameters: 2501(String)
4.17、select * from ACT_RU_IDENTITYLINK where PROC_INST_ID_ = ?
    Parameters: 2501(String)
4.18、insert into ACT_HI_TASKINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, OWNER_, ASSIGNEE_, START_TIME_, CLAIM_TIME_, END_TIME_, DURATION_, DELETE_REASON_, TASK_DEF_KEY_, FORM_KEY_, PRIORITY_, DUE_DATE_, CATEGORY_, TENANT_ID_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    Parameters: 5002(String), myProcess:1:4(String), 2501(String), 2502(String), 一级部门审批(String), null, null, null, 小1(String), 2018-08-29 23:48:07.214(Timestamp), null, null, null, null, usertask2(String), null, 50(Integer), null, null, (String)
4.19、insert into ACT_HI_ACTINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, ACT_ID_, TASK_ID_, CALL_PROC_INST_ID_, ACT_NAME_, ACT_TYPE_, ASSIGNEE_, START_TIME_, END_TIME_, DURATION_, DELETE_REASON_, TENANT_ID_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    Parameters: 5001(String), myProcess:1:4(String), 2501(String), 2502(String), usertask2(String), 5002(String), null, 一级部门审批(String), userTask(String), 小1(String), 2018-08-29 23:48:07.185(Timestamp), null, null, null, (String)
4.20、insert into ACT_HI_IDENTITYLINK (ID_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_, PROC_INST_ID_) values (?, ?, ?, ?, ?, ?)
    Parameters: 5003(String), participant(String), 小1(String), null, null, 2501(String)
4.21、insert into ACT_RU_TASK (ID_, REV_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_, CLAIM_TIME_) values (?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
    Parameters: 5002(String), 一级部门审批(String), null, null, 50(Integer), 2018-08-29 23:48:07.185(Timestamp), null, 小1(String), null, 2502(String), 2501(String), myProcess:1:4(String), usertask2(String), null, null, 1(Integer), (String), null, null
4.22、insert into ACT_RU_IDENTITYLINK (ID_, REV_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_, PROC_INST_ID_, PROC_DEF_ID_) values (?, 1, ?, ?, ?, ?, ?, ?)
    Parameters: 5003(String), participant(String), 小1(String), null, null, 2501(String), null
4.23、update ACT_HI_ACTINST set EXECUTION_ID_ = ?, ASSIGNEE_ = ?, END_TIME_ = ?, DURATION_ = ?, DELETE_REASON_ = ? where ID_ = ?
    Parameters: 2502(String), 小0(String), 2018-08-29 23:48:07.135(Timestamp), 1952270(Long), null, 2504(String)
4.24、update ACT_RU_EXECUTION set REV_ = ?, BUSINESS_KEY_ = ?, PROC_DEF_ID_ = ?, ACT_ID_ = ?, IS_ACTIVE_ = ?, IS_CONCURRENT_ = ?, IS_SCOPE_ = ?, IS_EVENT_SCOPE_ = ?, IS_MI_ROOT_ = ?, PARENT_ID_ = ?, SUPER_EXEC_ = ?, ROOT_PROC_INST_ID_ = ?, SUSPENSION_STATE_ = ?, NAME_ = ?, IS_COUNT_ENABLED_ = ?, EVT_SUBSCR_COUNT_ = ?, TASK_COUNT_ = ?, JOB_COUNT_ = ?, TIMER_JOB_COUNT_ = ?, SUSP_JOB_COUNT_ = ?, DEADLETTER_JOB_COUNT_ = ?, VAR_COUNT_ = ?, ID_LINK_COUNT_ = ? where ID_ = ? and REV_ = ?
    Parameters: 2(Integer), null, myProcess:1:4(String), usertask2(String), true(Boolean), false(Boolean), false(Boolean), false(Boolean), false(Boolean), 2501(String), null, 2501(String), 1(Integer), null, false(Boolean), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 0(Integer), 2502(String), 1(Integer)
4.25、Preparing: update ACT_HI_TASKINST set PROC_DEF_ID_ = ?, EXECUTION_ID_ = ?, NAME_ = ?, PARENT_TASK_ID_ = ?, DESCRIPTION_ = ?, OWNER_ = ?, ASSIGNEE_ = ?, CLAIM_TIME_ = ?, END_TIME_ = ?, DURATION_ = ?, DELETE_REASON_ = ?, TASK_DEF_KEY_ = ?, FORM_KEY_ = ?, PRIORITY_ = ?, DUE_DATE_ = ?, CATEGORY_ = ? where ID_ = ?
    Parameters: myProcess:1:4(String), 2502(String), 出差费用申报(String), null, null, null, 小0(String), null, 2018-08-29 23:48:07.083(Timestamp), 1952195(Long), null, usertask1(String), null, 50(Integer), null, null, 2505(String)
4.26、delete from ACT_RU_TASK where ID_ = ? and REV_ = ?
    Parameters: 2505(String), 1(Integer)

 

你可能感兴趣的:(工作流activiti)