JBPM中如何删除流程定义
//删除流程历史
DELETE FROM JBPM4_HIST_ACTINST WHERE EXECUTION_ LIKE '%EX%'
DELETE FROM JBPM4_HIST_VAR where PROCINSTID_ like '%EX%';
DELETE FROM JBPM4_HIST_PROCINST WHERE ID_ LIKE '%EX%';
DELETE FROM JBPM4_HIST_TASK WHERE EXECUTION_ LIKE '%EX%' ;
DELETE FROM JBPM4_PARTICIPATION WHERE SWIMLANE_ IN (SELECT DBID_ FROM JBPM4_SWIMLANE where EXECUTION_ IN (SELECT DBID_ FROM JBPM4_EXECUTION WHERE ID_ LIKE '%EX%'));
DELETE FROM JBPM4_PARTICIPATION WHERE TASK_ IN (SELECT DBID_ FROM JBPM4_TASK WHERE EXECUTION_ IN (SELECT DBID_ FROM JBPM4_EXECUTION WHERE ID_ LIKE '%EX%'));
DELETE FROM JBPM4_TASK WHERE EXECUTION_ IN (SELECT DBID_ FROM JBPM4_EXECUTION WHERE ID_ LIKE '%EX%');
DELETE FROM JBPM4_VARIABLE WHERE EXECUTION_ IN (SELECT DBID_ FROM JBPM4_EXECUTION WHERE ID_ LIKE '%EX%');
DELETE FROM JBPM4_EXECUTION WHERE ID_ LIKE '%EX%' AND KEY_ IS NULL;
//删除jbpm4_execution自连接
UPDATE JBPM4_EXECUTION SET INSTANCE_ = NULL WHERE ID_ LIKE '%EX%';
DELETE FROM JBPM4_SWIMLANE WHERE EXECUTION_ IN (SELECT DBID_ FROM JBPM4_EXECUTION WHERE ID_ LIKE '%EX%');
DELETE FROM JBPM4_EXECUTION WHERE ID_ LIKE '%EX%';