activity 根据流程实例ID删除流程实例删除流程部署

Posted ios9

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了activity 根据流程实例ID删除流程实例删除流程部署相关的知识,希望对你有一定的参考价值。

-- 删除流程实例(一定要以下表顺序,否则会报键约束错误)
delete from act_hi_attachment t where t.proc_inst_id_=‘7626‘;
delete from act_hi_comment t where t.proc_inst_id_=‘7626‘;
delete from act_hi_actinst t where t.proc_inst_id_=‘7626‘;
delete from act_hi_detail t where t.proc_inst_id_=‘7626‘;
 
delete from act_hi_identitylink t where t.task_id_ in (
    select t.ID_ from act_ru_task t where t.proc_inst_id_=‘7626‘
     union all
    select t.ID_ from act_hi_taskinst t where t.proc_inst_id_ =‘7626‘
) or t.proc_inst_id_ =‘7626‘;
delete from act_hi_taskinst t where t.proc_inst_id_=‘7626‘;
delete from act_hi_procinst t where t.proc_inst_id_=‘7626‘;
delete from act_hi_varinst t where t.proc_inst_id_=‘7626‘;
delete from act_ru_event_subscr t where t.proc_inst_id_=‘7626‘;
delete from act_ru_identitylink t where t.task_id_ in (
   select t.ID_ from act_ru_task t where t.proc_inst_id_=‘7626‘
) or  t.proc_inst_id_=‘7626‘;
delete from act_ru_variable t where t.proc_inst_id_=‘7626‘;
 
delete from act_ru_task t where t.proc_inst_id_=‘7626‘;
delete from act_ru_execution t where t.proc_inst_id_=‘7626‘;
 
 
-- 删除流程部署
select t.PROC_DEF_ID_ from act_ru_task t where t.proc_inst_id_=‘7626‘ ;
select ‘delete from act_re_procdef t where t.ID_=‘‘‘||t.ID_||‘‘‘;‘ as sql_str from act_re_procdef t where t.ID_ in ( ‘ApexUSMEditOrganizationProcess:1:7506‘ )
union all
select ‘delete from act_ge_bytearray t where t.DEPLOYMENT_ID_=‘‘‘||t.DEPLOYMENT_ID_||‘‘‘;‘ as sql_str from act_re_procdef t where t.ID_ in ( ‘ApexUSMEditOrganizationProcess:1:7506‘ ) ;
union all
select ‘delete from act_re_deployment t where t.ID_=‘‘‘||t.DEPLOYMENT_ID_||‘‘‘;‘ as sql_str from act_re_procdef t where t.ID_ in ( ‘ApexUSMEditOrganizationProcess:1:7506‘ ) ;































以上是关于activity 根据流程实例ID删除流程实例删除流程部署的主要内容,如果未能解决你的问题,请参考以下文章

117 - 进程实例 06

Activiti7工作流引擎:挂起状态和任务组

activiti 表——介绍

activiti查询

activiti动态获取当前流程节点的操作按钮

145 - 历史流程实例的操作