0
votes

In my project i am using Activiti API for process workflow.If i start activiti workflow by calling ProcessEngines.getDefaultProcessEngine() activiti will create few tables in our database like ACT_GE_PROPERTY,ACT_HI_ACTINST etc.. But our requirement is that we are not at all going to use activiti tables using our own database tables. How to avoid creating activiti tables in our database? Is it possible? I have read that we have to write our own implementation for ProcessEngineConfiguration.

Could anyone provide the steps to override implementation of ProcessEngineConfiguration?

Thanks in advance.

3
Do you want to change the table names of Activiti? Or do you want to store the activiti tables in a different database?King Midas

3 Answers

0
votes

IMHO, no.

Activiti is not just APIs, but also implementations of these APIs.

Most workflows would run for several times, and could involve some human tasks which may take time to finish. Hence Activiti has to persistent some thing, including definition of processes, status of running process instances, etc.

If you just don't want Activiti tables "pollute" your own database schema, you can make Activiti use another schema, or even another database.

If you insistance Activiti APIs use your own tables, maybe you have to implements not just ProcessEngineConfiguration, but also classes and SQLs under org.activiti.engine.impl.db package.

0
votes

Activiti 5 ans 6 make use of iBatis ORM to abstract the persistence layer from the Entity interfaces. At a minimum you will need to reimplement all persistence entities. You may be able to get away with simply updating the iBatis SQL files as long as you maintain the existing schema and only want to rename the tables themselves.

As TKJohn indicated, it is pretty easy to seperate Activiti tables from your application schema, in fact this would be considered best practice. However, it sounds like you want to go further than this, so reimplementation of persistence will be required.

For examples of such re-implementation, check out the Camunda and Flowable projects. Both have re-implemented persistence while retaining basically the same schema.

G

0
votes

Activiti requires those tables, but you can run those SQL scripts once and set SpringProcessEngineConfiguration this way. so it wont create but only update the tables if required. there is no work around. it requires those tables.

configuration.setDatabaseSchemaUpdate(SpringProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE);

Hope it helps.