DELETE FROM ACT_HI_ATTACHMENT WHERE PROC_INST_ID_= '流程ID';
DELETE FROM ACT_HI_COMMENT WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_HI_ACTINST WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_HI_DETAIL WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_HI_IDENTITYLINK WHERE TASK_ID_ IN(
SELECT ID_ FROM ACT_RU_TASK WHERE PROC_INST_ID_='流程ID'
UNION ALL
SELECT ID_ FROM ACT_HI_TASKINST WHERE PROC_INST_ID_='流程ID'
)OR PROC_INST_ID_ ='流程ID';
DELETE FROM ACT_HI_TASKINST WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_HI_PROCINST WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_HI_VARINST WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_RU_EVENT_SUBSCR WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ IN(SELECT ID_ FROM ACT_RU_TASK WHERE PROC_INST_ID_='流程ID')OR PROC_INST_ID_='流程ID';
DELETE FROM ACT_RU_VARIABLE WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_RU_TASK WHERE PROC_INST_ID_='流程ID';
DELETE FROM ACT_RU_EXECUTION WHERE PROC_INST_ID_='流程ID';