Configuring Multitenant with flowable(6.6.0)

How to configure Sharedschema&SharedEngine multitenant option either through property file or programmatically ?

Scenario 1 - Need to configure Mutli-tenant using same DB schema for all tenant-id

Scenario 2 - Need to configure Multi-tenant using different Schema for each tenant-id.

Note - If multi-tenant need to configured programmatically, where do we need to configure exactly ?

Scenario 1 is the default engine, pass the tenantId whenever you deploy a definition or start an instance and use it further in queries.

For scenario 2: have a look here: https://github.com/flowable/flowable-engine/blob/master/modules/flowable-engine/src/test/java/org/flowable/engine/test/cfg/multitenant/MultiTenantProcessEngineTest.java#L75

1 Like

For Scenario 1: Has it impact to performance? Something like ExecutorPerTenantAsyncExecutor

Hi @joram
I implemented this solution and I see we have to pass the tenantId both when deploying:

 repositoryService.createDeployment().addClasspathResource("pipelineFoo.bpmn20.xml")
                    .tenantId("Foo").deploy();

and when starting an instance:

runtimeService.createProcessInstanceBuilder()
.processDefinitionKey("pipelineFoo")
                .tenantId("Foo");

Is this correct?
I thought that if we deploy a definition along with a specific tenantId, we could start a process instance without re-specifying the tenantId
What would be the advantage of passing the tenantId when deploying if we pass it when starting the process instance?

Cheers