zoukankan      html  css  js  c++  java
  • 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' ) ;

  • 相关阅读:
    [CQOI2015]选数
    利用匈牙利算法&HopcroftKarp算法解决二分图中的最大二分匹配问题 例poj 1469 COURSES
    玩家死亡,屏幕灰白效果实现
    Bool值相加
    (转)D3D性能优化
    Flash AS3视频教程
    Accurately Profiling Direct3D API Calls (Direct3D 9)
    菲涅尔反射
    sscanf时用到郁闷问题
    如何精确测量程序运行时间(转)
  • 原文地址:https://www.cnblogs.com/ios9/p/13264405.html
Copyright © 2011-2022 走看看