AnsweredAssumed Answered

Feasibility of using tenant aware activiti

Question asked by sreekanth on Sep 9, 2016
Hi,
     I would like to know a few things of using activiti in a multitenant environment. I went through the following http://www.jorambarrez.be/blog/2015/10/06/multi-tenancy-separate-database-schemas-in-activiti and got to know its possible, wrt this i have couple of doubts which i couldn't find anywhere in net.

1) We are using spring framework as the base, and i know spring-activiti project is dedicated for spring framework users, but i could not see implementation similar to MultiSchemaMultiTenantProcessEngineConfiguration for spring-activiti. Since SpringProcessEngineConfiguration brings some additional benefit is it possible to create a new  MultiSchemaMultiTenantProcessEngineConfiguration which extends SpringProcessEngineConfiguration and use it ?

2) Regarding keeping bpmn files, how do we keep bpmn file specific to a tenant and files common for tenants. How does the engine insert information to the respective tenant schema if its specific or common.

3) We are using single datasource and schema per tenant, activity doesn't have direct support for that type so i hope by customizing TenantAwareDatasource i can achieve that too ?

4) We already have a ThreadLocal which holds tenant information. By extending TenantInfoHolder there are two calls to setCurrentTenantId and clearCurrentTenantId which is bound to activity so i hope its not safe to pass our existing tenant threadlocal to it which has different life cycle, or is it safe ?

We are working on a opensource project which built ground up to be multitenant, we are doing some case studies on how to bring Activiti into our project for BPMN, we are extremely delighted with Activiti's flexible architecture. Thanks in advance, hope someone can show some path for us.

Outcomes