In Single engines (Activiti Engine) on single database - Multi tenant

cancel
Showing results for 
Search instead for 
Did you mean: 
ratik_singhal
Established Member

In Single engines (Activiti Engine) on single database - Multi tenant

I need to implement Multi tenant in an Activiti (Single engine) on Single schema. I need to maintain a tenant information on single database.

Any guidance will be helpful !

 

My requirement is same that explained in below URL under Shared Database Multi-tenancy

Multi-Tenancy with separate database schemas in Activiti | Small steps with big feet 

8 Replies
jearles
Established Member II

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Ratik,

I'm not sure I follow. Activit already has the capability to be utilized for Multi-tenancy using the single existing schema for Activiti. The article you link describes several configurations: Shared DB Multi-tenancy (which seems to be what you're asking for), Multi-Engine Multi-tenancy and Multi-schema Multi-tenancy.

How exactly is what you want to implement different than what Activiti already supports?

-JEarles

ratik_singhal
Established Member

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Hi Jonathan,

Thanks for reply !

I want to implement Share DB Multi tenancy like describe in this picture http://www.jorambarrez.be/blog/wp-content/Screenshot-2015-10-06-12.57.00.png 

Yes, I have checked the Activiti Source code that its support multi tenancy but did not mentioned how we manage and store the master table of different tenant. Suppose Tenant 1 has user like A1, A2 etc and Tenant 2 has user like B1, B2 etc.

How will we keep separate the task / process for different tenant.

Is there any change required at DB level ??

jearles
Established Member II

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Ratik,

As the article you linked says, in the section you're referencing (Shared Database Multi-tenancy): "Activiti has been multi-tenant capable for a while now (since version 5.15)... ...The benefit of this approach is the simplicity of deployment, as there is no difference from setting up a ‘regular’ Activiti engine."

This is already supported by the default installation of Activiti - no additional changes are necessary. Activit handles the separation of process details. A brief description of Activiti's default multi-tenancy support can be found here in the User Guide.

-JEarles
bp3

ratik_singhal
Established Member

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Hi Jonathan,

Have you ever try to do any type of POC for the same ? 

jearles
Established Member II

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Ratik,

Can you give a little bit more detail about the intended outcome of your solution? Are you looking for the process and task information of each tenant to be separated at the database level?

I want to make sure we're both on the same page here Smiley Happy

EDIT: I think I understand; when you're looking at the tables for Activiti, there are tenant_ID's associated with processes, and tasks - but not within the act_ru_user and act_ru_group tables. So you're asking how the Users/Groups are differentiated across tenants, and how to do that?

-JEarles
bp3

jearles
Established Member II

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Hi Ratik,

I think I understand your dilemna now; The default capability for Activiti to handle multi-tenancy does not enforce user roles, meaning that individual users and groups are not bound to a specific tenant - is that correct?

-JEarles

ratik_singhal
Established Member

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Yes Jonathan, I'm looking for the tables for Activiti, where are tenant_ID's associated with processes, and tasks - but not found any information (key) for tenat's  in act_ru_user and act_ru_group tables.

So I am in process that how the Users/Groups are differentiated across tenants, and how can we achieved it ?

In actual implementation, we need to sync Azure Active directory to Activiti (and its DB). So might be we need to store the tenant information(also users and groups) from Azure active directory to Database schema.

My confusion is like that we dont have any table for tenant in Activiti so how can we achieved it. 

 

cjose
Senior Member II

Re: In Single engines (Activiti Engine) on single database - Multi tenant

Hi Ratik,

Here is my view on the multi-tenancy in Activiti Engine. The Activiti Engine has multi-tenancy support. Management of users and groups across multiple tenants is not really required for process execution, it is more a UI thing! Hence you won't find a tenant field in USER/GROUP tables

The default app that comes with the community version is not built with multi-tenant support. However you should be able to build an app with activiti embedded in it along with a multi-tenant UI. In such a case, it would be your app logic that will sync Azure Active directory to either your own application database or a custom user table in activiti database.


The other option is to use the Alfresco Enterprise Application which comes with multi-tenant support for users, groups etc.

Ciju