cancel
Showing results for 
Search instead for 
Did you mean: 

using custom table instead of ACT_RU_VARIABLE

vamsidharyeddu
Champ in-the-making
Champ in-the-making
Hello,
         We use activiti for our business process. We were using ACT_RU_VARIABLE(in the form of key,value pairs) to store information related to a process instance. And a lot of information is currently being stored in that way which made the dashboard(activiti explorer) very slow. So we decided to create a new table for that data with those keys as columns.We tried quite a few ways to go about that change:

Approach 1->Firstly we tried to tweak myBatis xml files(VariableInstance,Task and Execution) to use our new table instead of ACT_RU_VARIABLE. Inserts and updates are working fine(we were inserting into both ACT_RU_VARIABLE and our new table). We couldn't get selects to work.

Approach 2->We then tried creating a view of ACT_RU_VARIABLE from our new table. But this was also of no use.

My question is how to get the first approach working?
3 REPLIES 3

hari
Star Contributor
Star Contributor
Hi Vamsidhar,

I don't think having lot of information in a table will slow down the application since you wont be fetching all the information in the table onto the dashboard. Also it is not recommended to have your own table and tweak the activiti source code since the community or the activiti wont support the implementations.
To add to it, another issue would be when you have to upgrade to newer version of Activiti you will have to tweak the source code again.
We have been using activiti with postgres and have close to 30k+ records in that table but still we never faced any issues in terms of application getting slow.
So all I would say is that the approach you have taken is not recommened or suggested. Try to find the actual reason which is causing an issue for you and evaluate other options for solving it.

jyotigupta
Champ in-the-making
Champ in-the-making
@ asriharikiran

We have around 300K+ records in ACT_RU_VARIABLE due to which we are facing this issue.
Is there any other way to do this?

hari
Star Contributor
Star Contributor
Hi Jyoti,
3 Lakh records should not be a big deal for a database. I would recommend to index your tables.Also go through the below link and see if it helps.
http://www.catswhocode.com/blog/10-sql-tips-to-speed-up-your-database