标签:
--子表,procinst外键
delete from JBPM4_HIST_DETAIL where hproci_=‘13433593‘;
--子表,procinst外键
delete from JBPM4_HIST_ACTINST where execution_=‘JbpmCheckFlowVersionThi.13433593‘ ;
--主表,BDid主键
delete from JBPM4_HIST_PROCINST where dbid_ = 13433593 ;
delete from jbpm4_hist_task where dbid_ = 13364559 ;
--工作流业务表
insert into jbpm4_execution (dbid_, class_, dbversion_, activityname_, procdefid_, hasvars_, name_, key_, id_, state_, susphiststate_, priority_, hisactinst_, parent_, instance_, superexec_, subprocinst_, parent_idx_) values (13433593, ‘pvm‘, 114, ‘处长岗‘, ‘JbpmCheckFlowVersionThi-3133‘, 1, null, null, ‘JbpmCheckFlowVersionThi.13433593‘, ‘active-root‘, null, 0, 13364560, null, 13433593, null, null, null);
insert into jbpm4_task (dbid_, class_, dbversion_, name_, descr_, state_, susphiststate_, assignee_, form_, priority_, create_, duedate_, progress_, signalling_, execution_id_, activity_name_, hasvars_, supertask_, execution_, procinst_, swimlane_, taskdefname_) values (13364559, ‘T ‘, 1, ‘处长岗‘, null, ‘open‘, null, ‘directorV1.3‘, null, 0, TO_DATE(‘2016-03-22 15:54:05‘, ‘%Y-%m-%d %H:%M:%S‘), null, null, 1, ‘JbpmCheckFlowVersionThi.13433593‘, ‘处长岗‘, 0, null, 13433593, 13433593, null, ‘处长岗‘);
insert into JBPM4_VARIABLE (dbid_, class_, dbversion_, key_, converter_, hist_, execution_, task_, lob_, date_value_, double_value_, classname_, long_value_, string_value_, text_value_, exesys_) values (13433593, ‘string‘, 0, ‘opinion‘, null, 0, 13433593, null, null, null, null, null, null, ‘YES‘, null, null);
主子表关系:
JBPM4_HIST_PROCINST这张表,因为JBPM4_HIST_ACTINST表的HPROCI_字段是关联JBPM4_HIST_PROCINST表的DBID_字段,如果JBPM4_HIST_PROCINST不存在就会报 table or view not exist. (表或视图不存在)
select * from JBPM4_VARIABLE where dbid_=‘13433593‘;// dbid= reinsbpmMain.taskid;
dbid= reinsbpmMain.taskid;
delete from JBPM4_HIST_PROCINST where dbid_ = 13433593 ;
delete from jbpm4_hist_task where dbid_ = 13364559 ;
select * from jbpm4_hist_task where execution_ = ‘JbpmCheckFlowVersionThi.13433593‘ ; //若 hist_actinst表中,
select * from JBPM4_HIST_ACTINST where execution_=‘JbpmCheckFlowVersionThi.13433593‘ ; //删除处长审批,即 最后一条数据!注:需注意两者约束!
select * from JBPM4_VARIABLE where dbid_=‘13433989‘;//同上!
标签:
原文地址:http://www.cnblogs.com/catkins/p/5437841.html