JBPM的常規操作

2021-09-02 03:17:20 字數 4142 閱讀 8817

--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 = ?);

--刪除單據資訊,修改表名和單據號

Git的常規操作

這裡記錄一些常用的git操作,以備不時之需 清除沒有執行add操作的檔案 git clean f 清除沒有執行add操作的資料夾 git clean df 丟棄沒有被commit的檔案的更改 git checkout filename 丟棄所有沒有被commit操作的問價的更改 git checko...

vim的常規操作

vim的三種模式命令模式插入模式退出模式 命令模式下的操作 1 set nu 顯示行號 set nonu 取消行號 set mouse a 設定滑鼠 set cursorline 設定行線 注 以上均為臨時操作,重啟檔案後需要重新設定 設定vim 的永久工作方式 在檔案etc vimrc最後寫入以上...

Golang Context的常規操作

golang context的常規操作 context是go的併發程式設計的常用模式,可以通過context來處理超時,取消任務等一系列操作 func main childctx,i time.after time.second 2 2秒後開始關閉 cancel 關掉paraentcontext,會...