JBPM Workflow Table complement record

Source: Internet
Author: User
Tags jbpm

One: Historical data table 11.  Jbpm4_hist_actinst Process activity (node) instance table holds history of activity instance 12. Jbpm4_hist_detail Process History Detail Table SaveVariable change historyJbpm4_hist_procinst Process Instance History table holds history information for process instance 14. Jbpm4_hist_task The history of the Task instance history table for the process. Jbpm4_hist_var process variables (context) History table save historical variables if: In the final step of the process, after the initiator submitted to the Director, the Director after the approval of the operation, the workflow has been completed, but the business table is not synchronized update: This record is limited to: the director in the process audit last operation, When the consent process is executed:

--child table, procinst foreign key
Delete from Jbpm4_hist_detail where hproci_= ' 13433593 ';
--child table, procinst foreign key
Delete from jbpm4_hist_actinst where execution_= ' jbpmcheckflowversionthi.13433593 ';
--Main Table, Bdid primary key
Delete from jbpm4_hist_procinst where dbid_ = 13433593;

Delete from jbpm4_hist_task where dbid_ = 13364559;

--Workflow Business Table

Insert into Jbpm4_execution (dbid_, Class_, Dbversion_, Activityname_, Procdefid_, Hasvars_, Name_, Key_, Id_, State_, SUS Phiststate_, Priority_, Hisactinst_, Parent_, Instance_, Superexec_, Subprocinst_, parent_idx_) VALUES (13433593, ' PVM ', 114, ' Director Kong ', ' JbpmCheckFlowVersionThi-3133 ', 1, NULL, NULL, ' jbpmcheckflowversionthi.13433593 ', ' active-root ', NULL, 0, 13364560, NULL, 13433593, NULL, NULL, NULL);

Insert into Jbpm4_task (dbid_, Class_, Dbversion_, Name_, Descr_, State_, Susphiststate_, Assignee_, Form_, Priority_, CRE Ate_, Duedate_, Progress_, Signalling_, Execution_id_, Activity_name_, Hasvars_, Supertask_, Execution_, Procinst_, Swimlane_, Taskdefname_) VALUES (13364559, ' T ', 1, ' director Hillock ', NULL, ' open ', null, ' directorV1.3 ', NULL, 0, to_date (' 2016-03-2 2 15:54:05 ', '%y-%m-%d%h:%m:%s '), NULL, NULL, 1, ' jbpmcheckflowversionthi.13433593 ', ' Director Kong ', 0, NULL, 13433593, 13433593, NULL, ' post of director ');

Insert into jbpm4_variable (dbid_, Class_, Dbversion_, Key_, Converter_, Hist_, Execution_, Task_, Lob_, Date_value_, Doub Le_value_, Classname_, Long_value_, String_value_, Text_value_, Exesys_) VALUES (13433593, ' string ', 0, ' opinion ', NULL, 0 , 13433593, NULL, NULL, NULL, NULL, NULL, NULL, ' YES ', null, NULL);

Principal table Relationship:

Jbpm4_hist_procinst This table, because the Hproci_ field of the Jbpm4_hist_actinst table is the Dbid_ field of the associated Jbpm4_hist_procinst table, if Jbpm4_hist_ Procinst does not exist, it will report table or view not exist.  (table or view does not exist)

Association: actinst.hproci_ = procinst.dbid_ (primary key); child table: jbpm4_hist_actinst; Main table: Jbpm4_hist_procinst;--------------------------- ----------------------------------------------------------------------------------------------------------- Supplementary Tables:Jbpm4_execution;jbpm4_task; jbpm4_variable; The principle of complement: in the following order;SELECT * from jbpm4_execution where dbid_ = ' 13433593 ';//dbid= Reinsbpmmain.taskid;select * from Jbpm4_task where dbid_= ' 1 3364559 ';//In principle hist_task.taskid, constrain the htask_ of the Jbpm4_hist_actinst table

SELECT * from jbpm4_variable where dbid_= ' 13433593 ';//dbid= Reinsbpmmain.taskid;

Dbid= Reinsbpmmain.taskid;

Delete table: in the following order; Delete from Jbpm4_hist_actinst where dbid_ in (13364560,13354970);

Delete from jbpm4_hist_procinst where dbid_ = 13433593;
Delete from jbpm4_hist_task where dbid_ = 13364559;

Correlation Scale:

SELECT * from jbpm4_hist_task where execution_ = ' jbpmcheckflowversionthi.13433593 '; If the Hist_actinst table,
SELECT * from Jbpm4_hist_actinst where execution_= ' jbpmcheckflowversionthi.13433593 '; Delete the director's approval, that is, the last piece of data! Note: Be aware of the two constraints!

As above analysis: if the Hist_actinst table, the director of the Approval node, the Htask field can be left value (that is, Hist_task will have a dbid_ of 9092064 data), so that, when executed, only update 9092064 of its time, will not reinsert the time! Second: process instance table complement principle, based on! Jbpm4_execution Process Example table: Jbpm4_hist_actinst table records as the basis for the number of complements! SELECT * from jbpm4_execution where dbid_ = ' 13433989 ';//id=actinst.dbid_; SELECT * from Jbpm4_task where dbid_= ' 13364561 ';//actinst.htask_

SELECT * from jbpm4_variable where dbid_= ' 13433989 ';//ditto!

Complement, make sure that the data in the table above is complete, ensuring that process ID consistency is verified under its constraints!

JBPM Workflow Table complement record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.