Using Flowable Design multi tenant
This documentation is outdated and only applies to Flowable Design 3.13 and earlier as well as the Angular-based Flowable Design 3.14. The tenant concept has been reworked in the Flowable Design 3.14 and enhanced with workspaces.
By default Flowable Design runs in single tenant mode, which means that all models in the repository are shared with all the users of Flowable Design. When not all models should be shared with all model users or when the models need to be deployed to a multi tenant Flowable Engine environment, Flowable Design can be configured to run a multi tenant mode.
Configuring the multi tenant mode
To be able to use Flowable Design in a multi tenant way, the following property value needs to be set:
flowable.modeler.app.multi-tenant-enabled=true
This enables the user management of Flowable Design to define a tenant id for a user. As an admin user, first navigate to the user management section in Flowable Design.
Here you can add new users or change existing user details as an admin user. In the user details screen there’s a field
Tenant ID
that provides the ability to define a tenant identifier for a user.
When logging in with a user that has the tenant identifier set, only the models that have the same identifier will be shown and accessible. When a user with a tenant identifier creates a new model, this model automatically will use the same tenant identifier.
Using a default tenant
The Flowable engines support a feature that is called default tenant
. This means that when a definition is resolved, liked a process or case definition,
first a lookup is done within the tenant context of the user, but if it’s not found another lookup is done to find the definition in the default tenant.
In this way the default tenant can be used for all definitions that can be shared across all tenants, so that they don’t have to be deployed to every single tenant separately.
In Flowable Design a user that is configured with the default tenant identifier, can create and edit models for the default tenant. When an app is deployed from Flowable Design with a user that has the default tenant identifier, the deployment will be made available in the default tenant in the Flowable engines.
It’s also possible to define a default tenant in Flowable Design to be able to reuse models from the default tenant model repository across different tenants.
In this way the app deployment from Flowable Design will contain both default tenant and tenant specific models, and the deployment done to the Flowable engines will contain all model artefacts.
In this case, the default tenant is only used at modeling time and not at runtime in the Flowable Engines. In the Flowable Engines the models are deployed to every tenant in specific, not to any default tenant.
This is an option when there are only several tenants and not tens or hundreds of tenants.
A tenant can be configured to be the default tenant
in Flowable Design using the following property:
flowable.modeler.app.tenant.default-tenant-id=default
With this property enabled, the models from the default tenant are now available in every tenant specific repository in addition. So when creating a tenant specific app, you can include both tenant specific and default tenant models. The tenant specific app will include all models when exporting or deploying it.
Using the default tenant in Flowable Design introduces a new requirement when modeling your default tenant cases, process and forms etc. The model references within the default tenant models need to be done using the manual key value option in the model reference property component:
So when you have for example a default tenant root case model that is used across all tenants and this has a process task that references a tenant specific process model, then the model reference should be done using the manual key value option. This prevents the default tenant root case model from having a direct reference to a process model. When using this default tenant root case model in a tenant specific app, the tenant specific process model can be added to the app and on export or publish it will contain the default tenant case model and the tenant specific process model.
When instead of the manual key value option, a model reference was made to a default tenant process model, this has the result that also the default tenant process model would have been added to the tenant specific app when adding the default tenant case model.