JBPM的表使用了非常多的外键,通过外键实现数据的完整性约束。
当我们希望手工清除JBPM的数据时,这些外键就给我们带来了较大的困扰。
以下是根据经验整理出来的SQL,以备查(JBPM3.1.1版本):
- delete
- from jbpm_log
- where token_ in(
- select id_
- from jbpm_token
- where processinstance_ in(
- select id_
- from Jbpm_Processinstance
- where id_ in(select processid from biz_table where title like 'condition %')
- )
- );
- d