分享

删除jbpm 已启动流程数据 示例

 怀旧妞妞 2011-03-29
删除流程发布数据
select t.*, t.rowid from jbpm4_deployprop t where t.deployment_='1600001' or t.objname_='流程xml文件'
select t.*, t.rowid from JBPM4_LOB t where t.deployment_='1600001'
select t.*, t.rowid from jbpm4_deployment t where t.dbid_='1600001'
1、 
根据文件名称到对应的表单内容表找到对应的流程实例ID

2、  清除流程历史表顺序是:

首先删除jbpm4_hist_actinst表,SQL语句例:select t.*, t.rowid from jbpm4_hist_actinst t where t.execution_ in('FaWenShenPi.1170315')

接着删除jbpm4_hist_procinst表,SQL语句例:select t.*, t.rowid from jbpm4_hist_procinst t where t.id_ in('FaWenShenPi.1170315')

然后删除jbpm4_hist_task 表,SQL语句例:select t.*, t.rowid from jbpm4_hist_task t where t.execution_ in('FaWenShenPi.1170315')

历史表删除完毕。

3、  删除流程日志表:

删除jbpm_workflow_hislog表,SQL语句例:select t.*, t.rowid from jbpm_workflow_hislog t where t.examples_id in('FaWenShenPi.1170315')

select t.*, t.rowid from  jbpm_workflow_log where t.examples_id in('FaWenShenPi.1170315')

4select t.*, t.rowid from jbpm4_participation t where t.task_ in(select t.dbid_ from jbpm4_task t where t.execution_id_ in('ShouWenChuLi.1150277'))

4、  删除流程活动节点表:

删除jbpm4_task表,SQL语句例:select t.*, t.rowid from jbpm4_task t where t.execution_id_ in('FaWenShenPi.1170315')

5、  删除表

删除jbpm4_document表,SQL语句例:select t.*, t.rowid from jbpm4_document t where t.instanceid in('FaWenShenPi.1170315')

6、  删除jbpm4_variable

SQL语句例:select t.*, t.rowid from jbpm4_variable t where t.execution_ in(select t.dbid_ from jbpm4_execution t where t.id_ in('FaWenShenPi.1170315'))

7、删除jbpm4_execution

select t.*, t.rowid from jbpm4_execution t where t.id_ in('FaWenShenPi.1170315')

8、删除对应的表单内容表
SQL集合:
select t.*, t.rowid from jbpm4_hist_actinst t where t.execution_ in('ShouWenChuLiNew.1670007')
select t.*, t.rowid from jbpm4_hist_procinst t where t.id_ in('ShouWenChuLiNew.1670007')
select t.*, t.rowid from jbpm4_hist_task t where t.execution_ in('ShouWenChuLiNew.1670007')
select t.*, t.rowid from jbpm_workflow_hislog t where t.examples_id in('ShouWenChuLiNew.1670007');
select t.*, t.rowid from  jbpm_workflow_log  t where t.examples_id in('ShouWenChuLiNew.1670007')
select t.*, t.rowid from jbpm4_participation t where t.task_ in(select t.dbid_ from jbpm4_task t where t.execution_id_ in('ShouWenChuLiNew.1670007'))
select t.*, t.rowid from jbpm4_task t where t.execution_id_ in('ShouWenChuLiNew.1670007')
select t.*, t.rowid from jbpm4_document t where t.instanceid in('ShouWenChuLiNew.1670007')
select t.*, t.rowid from jbpm4_variable t where t.execution_ in(select t.dbid_ from jbpm4_execution t where t.id_ in('ShouWenChuLiNew.1670007'))
select t.*, t.rowid from jbpm4_execution t where t.id_ in('ShouWenChuLiNew.1670007')

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多