Shared-Engine / Multi-Schema

Hi Team,

We are trying to achieve shared Engine/Multi Schema approach by following the below link.

https://blog.flowable.org/2018/09/11/multitenancy-in-flowable/

Currently there is a requirement where we need to create new schema based on the tenantId during runtime. We followed the above post but couldn’t figure it out the way to do it.

It would be great if you could assist me.

Thanks.

1 Like

Hello,

It would be great if you provided more specific information on what you have already achieved, and where you might be stuck.

I haven’t personally tried to do it, but it seems that you create tenant-schemas using

config.registerTenant("tenant1", createDataSource("jdbc:h2:mem:flowable-tenant1;DB_CLOSE_DELAY=1000", "sa", ""));

And then:

This approach requires the implementation of a class that implements the Java interface TenantInfoHolder. The method getCurrentTenantId() must return the tenant ID for the current operation.

1 Like