AnsweredAssumed Answered

Activiti with multiple databases

Question asked by swamy2156 on Jul 26, 2013
Latest reply on Apr 22, 2014 by jbarrez
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.




Outcomes