cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti with multiple databases

swamy2156
Champ on-the-rise
Champ on-the-rise
I am new bee for activiti. I am in a situation to work on multiple databases(as of now 2) using a service which will update task(a common service to close the tasks from  databases) based on a key in request payload. I am having 2 approaches to achieve this but I am not clear about pro's and con's of these and hence not able to conclude either of these 2.

Approach 1) my update-task service bean configuration will load 2 ProcessEngines each having its own datasource. While processing request payload, based on a key in payload, one of the ProcessEngine's taskService will be initiated to close the task. It seems its a clear case with running with multiple processEngines deals with their own databases.

Approach 2) My service will load one ProcessEngine with routing between multiple datasources dynamically using Spring feature AbstractRoutingDataSource (http://blog.springsource.com/2007/01/23/dynamic-datasource-routing/). I implemented this solution but not sure that one processEngine routing between different datasources is good approach or not….

BTW, jobExecutor disabled(jobExecutorActivate=false) in both approaches because its not required for this service.

I would like to know which is the best approach to follow? Any reply will be appriciated.


-Swamy.




4 REPLIES 4

trademak
Star Contributor
Star Contributor
I don't understand the reason why you have 2 databases yet. Why do you need 2 databases for Activiti?
It's a rather uncommon use case, so can't give you any pointers without more info.

Best regards,

hyapit
Champ in-the-making
Champ in-the-making
Hi Tijs,

In my case, there's a security requirement to split customer data into separate logical DBs (which is a common MTA requirement nowadays), while my app is multi-tenant. My current solution is to one Activiti engine per customer in a single JVM ( I'll leave out the gory details for now Smiley Happy), which doesn't work as great. Do you guys have any plans to support this use case anytime soon?

Thanks!

trademak
Star Contributor
Star Contributor
Hi,

So the multi tenant support we have in Activiti 5.15 is not what you are looking for?
We don't have plans for other multi tenant support. What is it specifically what you are looking for?

Best regards,

jbarrez
Star Contributor
Star Contributor
> data into separate logical DBs

No, we won't support switching DB's in Activiti.