[jboss-user] [JBoss jBPM] - Deleting data from jbpm tables in database

ksdeger do-not-reply at jboss.com
Fri Nov 3 18:36:40 EST 2006


We have a system that is successfully using JBPM. It creates a very large number of process instances a day, so we would like to delete them when they have completed to free up space in the database.

I am going to write code using GraphSession.deleteProcessInstance to do this, but until I can get that done I was hoping to put out a quick SQL script to do the clean up.  I have the SQL script completed, but there is something odd going on. The jbpm_bytearray table has a large number of rows with no values in the name_ or filedefinition_ columns. Also, the id_'s for these rows do not appear in the jbpm_variableinstance bytearrayvalue_ column. I looked at the jbpm hibernate cfg.xml files, and I can't figure out where these rows are coming from, or how I would know to which process instance they belongs. 

Just as an example, I ran a single file through our JBPM flow, and after the clean up, which removes all the jbpm_bytearray and jbpm_byteblock rows which have valid references in the jbpm_variableinstance table, there were still 276 new rows in the jbpm_blockbyte table.

I cannot leave this data to accumulate as it eventually kills the database.

Any suggestions? We are using JBoss 4.0.1sp1 and JBPM 3.0.2.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983143#3983143

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983143



More information about the jboss-user mailing list