In a Multi-tenant application module the following elements have the capability of isolating data per tenant:
On an OnLineShop application, Client, Product, and Invoice data are isolated by tenant since each tenant has its own clients, products and invoices. Currency exchange rates and Country data are shared among all client organizations, since currency exchange rates are the same independently of the tenant.
Site Properties: allow data isolation of application settings.
Since client organizations of an OnLineShop application are spread worldwide, each tenant has its own default currency: the 'Default Currency' site property is isolated.
On the other hand, the number of times a user can miss the password in the log in process is the same for all client organizations: the 'Number of Retries' site property is shared among tenants.
Timers: Allow narrowing the scope of execution of timers by tenant. Single-Tenant timers run once for the default tenant, and Multi-Tenant timers run once for each tenant.
Given that each client organization has its own clients and products, a timer for consolidating reporting data is isolated amongst tenants. But since all tenants share the same currency rates, a timer to update currency rates is shared between all tenants.
For designing data isolation in an Multi-tenant application, set data isolation for tenant-specific elements of each eSpace in one of the following ways:
Set the Is Multi-tenant property of the eSpace and all its tenant-specific elements automatically inherit it, except if they already have their own Is Multi-tenant property set.
Set the Is Multi-tenant property of an eSpace element with one of the following values:
'Yes': the element isolates data by tenant, independently of the value set in the eSpace's Is Multi-tenant property;
'No': the element does not isolate data by tenant, independently of the value set in the eSpace's Is Multi-tenant property;
<not defined>: the element inherits the value set in the eSpace's Is Multi-tenant property.
In the case of Entities, the icon changes to when they are Multi-tenant.
For exceptional scenarios where data is tenant specific, but isolation is not enforced in the current application module, simply check the Show Tenant Identifier property, available in the Advanced tab of the Entity Editor.
The Entity's icon changes to , when the Tenant Identifier property is checked.
As an example, this attribute is used for creating logs in a Multi-tenant application having entity data usage per tenant.
OutSystems Platform provides you with mechanisms to reuse Multi-tenant entities among application modules. You can expose your Multi-tenant entities to other modules or consume Multi-tenant entities defined in another module.
Using a Multi-tenant entity reference in a consumer module allows changing the Show Tenant Identifier property value of that entity.
Be aware that in case of using an action reference that has a Multi-tenant entity as input or output parameter, and the consumer module change the Show Tenant Identifier property, an error message is presented in the Consumer module. To fix these situations simply set the Show Tenant Identifier property value back to same one exposed by Multi-tenant entity.
About Multi-Tenancy | Implementing Multi-Tenancy | Entity Properties