AnsweredAssumed Answered

How do I configure a Multi-Schema Multi-Tenant Process Engine for Postgres schemas?

Question asked by replicon-dan on Oct 2, 2017

I'm trying to create a multi-schema multi-tenant instance of Activiti 6.0.0 using postgres as the backend database. Each of my tenants will exist in the same database, but have separate schemas within postgres.

 

For example:

Tenant 1: jdbc:postgresql://localhost:5432/mydb?currentSchema=tenant1

Tenant 2: jdbc:postgresql://localhost:5432/mydb?currentSchema=tenant2

etc...

 

I've modified the testcase here to point to my postgres instances. It will successfully create the first tenant's schema just fine. However, once it moves on to the second tenant, the schema validation incorrectly identifies the original's schema, and determines that it doesn't need to create the new tenant's schema. It will fail shortly thereafter when it tries to read the contents from the db (which is correctly pointed at the right schema).

 

From what I'm able to determine during debugging, when it's retrieving the list of tables through the catalog, it's not filtering by the specific tenant's schema that we're interested in.

 

Am I overlooking something? This seems like a bug to me. I've attached my modified test case.

Attachments

Outcomes