# Shared-Engine / Multi-Schema

**URL:** <https://forum.flowable.org/t/shared-engine-multi-schema/2920>\
**Category:** Uncategorized\
**Created:** [November 20, 2018, 5:59am UTC](https://forum.flowable.org/t/shared-engine-multi-schema/2920 "2018-11-20T05:59:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kratyos](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kratyos/32/753_2.png) [@Kratyos](https://forum.flowable.org/u/Kratyos)\
**Post date:** [November 20, 2018, 5:59am UTC](https://forum.flowable.org/t/shared-engine-multi-schema/2920/1 "2018-11-20T05:59:25Z")

</div>

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/](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.

---

<div class="post-metadata">

**Author:** ![inakihn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/inakihn/32/799_2.png) [@inakihn](https://forum.flowable.org/u/inakihn)\
**Post date:** [November 21, 2018, 7:02am UTC](https://forum.flowable.org/t/shared-engine-multi-schema/2920/2 "2018-11-21T07:02:47Z")

</div>

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.
