Activit 5.13 工作流部署新版本后回退到上一个版本

有时因为某些原因Activit流程部署新版本后,还没有发起流程,回退到上一个版本。
操作过程:

1、查询版本更新记录,记录字段ID_值,假设值为100:

select to_char(t.deploy_time_,'yyyy-mm-dd hh24:mi:ss') dtime,t.* from act_re_deployment t order by t.deploy_time_ desc;

2、根据上面ID_值100(下同),删除表act_re_procdef的对应记录

delete from act_re_procdef t where t.deployment_id_=100;

3、删除表act_ge_bytearray的对应记录

delete from act_ge_bytearray t where t.deployment_id_=100;

4、删除表act_re_deployment的记录

delete from act_re_deployment t where t.id_=100;

说明:
主表act_re_deployment和子表act_ge_bytearray存在约束关系,如果先删除act_re_deployment,则会提示:
ORA-02292:违反完整约束条件(TESTDB.ACT_FK_BYTEARR_DEPL)- 已找到子记录

下面sql语句可以根据约束名来查询是哪张表;

select a.constraint_name, a.table_name, b.constraint_name 
from user_constraints a, user_constraints b
where a.constraint_type = 'R' 
and b.constraint_type = 'P' 
and a.r_constraint_name = b.constraint_name
and a.constraint_name = 'ACT_FK_BYTEARR_DEPL' 
;

--结果,第2列为表名

ACT_FK_BYTEARR_DEPL ACT_GE_BYTEARRAY SYS_C0022869

原文地址:https://www.cnblogs.com/gdjlc/p/11325308.html