`

JBPM的常规操作

    博客分类:
  • JBPM
 
阅读更多

--1.撤回到上一个节点
--删除高经理审批之后所有的节点的审批意见(如果流程已经结束,需要处理流程实例表)
delete fw_wf_course c where f.course_id in (227072) and f.process_instance_id = 2262335;

--1654048 将流程回滚到系统部经理审批
update jbpm_token t set t.node_ = 1654048
where t.id_ = 2262336 and t.processinstance_ = 2262335;

--删除高经理之后的审判任务
delete jbpm_taskinstance t
where t.id_ in (2281030)
and t.procinst_ = 2262335;

--将高经理审批节点初始化到未审批状态,注意要该任务类型ID,也可以先删除待审任务,再加一个任务,异曲同工之妙
update jbpm_taskinstance t
set t.end_ = null ,t.version_ = 1 ,t.isopen_ = 1 ,t.issignalling_ = 1
where t.id_ = 2270958 and t.procinst_ = 2262335;

 

 

--2 .跳过一些节点到某一个节点
--1654048 将流程执行到开发经理签收
update jbpm_token t
set t.node_ = 1654059
where t.id_ = 2855012 and t.processinstance_ = 2855011;

--删除曾总之后的审批任务,留一个到下面修改用
delete jbpm_taskinstance t
where t.id_ in (2862658 ,2862654)
and t.procinst_ = 2855011;

--修改流程变量值,不需要副总和总裁审批
update jbpm_variableinstance v
set v.class_ = "S" ,v.stringvalue_ = 'no'
where v.id_ = 2862653;

--修改当前任务或某节点的新任务,省去先删除在新增的烦恼,主要要改任务类型ID
update jbpm_taskinstance t
set t.name_ = "开发经理签收" ,t.actorid_ = '10466'
where t.id_ = 2862971 and t.procinst_ = 2855011;

 


--新增总裁审批
--修改流程变量值,需要总裁审批
update jbpm_variableinstance v
set v.stringvalue_ = 'Y'
where v.id_ = 3714450;

update jbpm_token t
set t.node_ = 1654723
where t.id_ = 3707286 and t.processinstance_ = 3707285;

update jbpm_taskinstance t
set t.name_ = '总裁审批' ,t.actorid_ = '1' ,t.task_ = 1654726
where t.id_ = 3811560 and t.procinst_ = 3707285;

 

 

 

--删除流程,删除之前需要备份
--删除单据信息和他的流程信息,先删除流程再删除单据
delete from jbpm_variableinstance v
where v.processinstance_ in (select j.id_ from jbpm_processinstance j where j.bizno = ?)

delete from fw_wf_course c
where c.process_instance_id in
(select p.id_ from jbpm_processinstance p where p.bizno = ?)

--可能关联的表 jbpm_comment ,jbpm_job ,jbpm_log ,jbpm_pooledactor
--删除任务实例已经他的关联表记录,一定要按照如下顺序
delete from jbpm_taskactorpool tp
where tp.taskinstance_ in
(select t.id_ from jbpm_taskinstance t where t.procinst_ in (select p.id_ from jbpm_processinstance p where p.bizno = ?))

delete from jbpm_taskinstance t
where t.procinst_ in
(select p.id_ from jbpm_processinstance p where p.bizno = ? );

delete from jbpm_pooledactor p
where p.swimlaneinstance_ in
(select js.id_ from jbpm_swimlaneinstance js where js.taskmgmtinstance_ in
(select jm.id_ from jbpm_moduleinstance jm where jm.processinstance_ in
(select p.id_ from jbpm_processinstance p where p.bizno = ?)));

delete from jbpm_swimlaneinstance js
where js.taskmgmtinstance_ in
(select jm.id_ from jbpm_moduleinstance jm where jm.processinstance_ in
(select jp.id_ from jbpm_processinstance jp where jp.bizno = ?));

--jbpm_moduleinstance 与 jtb.token_ 关联表
delete from jbpm_tokenvariablemap jt
where jt.token_ in
(select t.id_ form jbpm_token t where t.processinstance_ in
(select p.id_ from jbpm_processinstance p where p.bizno = ?));

delete from jbpm_moduleinstance jm
where jm.processinstance_ in
(select jp.id_ from jbpm_processinstance jp where jp.bizno = ?);

delete from jbpm_runtimeaction jr
where jr.processinstance_ in
(select jp.id_ from jbpm_processinstance jp where jp.bizno = ?);

--关联jbpm_token表 roottoken_ 先解除关联
update jbpm_processinstance p
set p.roottoken_ = null
where p.id_ in
(select jp.id_ from jbpm_processinstance jp where jp.bizno = ?);

--关联 jbpm_processinstance
delete from jbpm_token t
where t.processinstance_ in
(select jp.id_ from jbpm_processinstance jp where jp.bizno = ?);

--曲线删除
delete from jbpm_processinstance p
where p.id_ in
(select jp.id_ from jbpm_processinstance jp where jp.bizno = ?);

--删除单据信息,修改表名和单据号

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics