Tenant-specific entities screens/screen flow


According to GitHub - cuba-platform/multitenancy-addon: Implementation of a single database multi-tenancy support for CUBA applications. it’s possible to have tenant-specific entities screens. Let’s have a look at the multitenancy addon demo (GitHub - cuba-platform/multitenancy-addon-demo) and discuss whether the following would be possible to implement:

  • We have a single application the user logs in and decides whether to shop in Walmart or Costco (2 tenants in this example). He can switch between the stores e.g. by selecting the store from a dropdown list and starts shopping.
  • The user can return to the main screen and he sees all open orders in one list of both stores (tentants). In this list he clicks on any order in any store to change the delivery date.
  • The stores (tenants) may have little differences such as, less fields/tabs in a screens than the other, a different checkout procedure or different screen flows for more complex products.

Would that be possible and if yes how would a CUBA project be structured and how can the user change the tenant at runtime within the application?

Best Wern

Hi Werner,

I’m not sure if it can be achieved easily. Multi-tenancy is about complete data separation and your description looks like a semi-transparent application data. Even in Amazon, you have to switch between’ let’s say amazon.com and amazon.co.uk shops and you’re not able to see orders in one list, every app has its own shopping list, but you use the same credentials though.

In CUBA, screens are not tenant-specific as well as entities, I guess you just misread To manage tenants go to the Tenant management -> Tenants screen sentence It means Go to menu: Tenant management -> Tenants .

You can create tenant-specific business process flows though.

It looks like your setup is not exactly about multi-tenancy, but about creating a proxy application for switching between tenants.

I guess we discussed a similar setup with you recently in this thread: Project setup for a complex multi tenant application - #9 от пользователя mario - CUBA.Platform Did it work for you?