HELP! Creating New Tenants


#1

Hi,
I’m trying to create a new Tenant with the ./ant create-tenant command

tenant ID: xxx001
=> database: ‘ofbiz_xxx001’
=> database: 'ofbizolap_xxx001

But…, neither the databases nor the xxx001-admin user are created.

I would like to confirm if there is any problem with this or if I’m doing something wrong.
(some time ago I did something similar with Apache Ofbiz and it worked fine).

Thanks!
Regards


#2

Hello. What database are you using?

To my knowledge that command itself should create the databases if you select Derby (d) and leave other fields blank except tenant ID. For other database, I’m not sure it actually creates the databases or only creates/populates the tables.

You also usually set general.properties#multitenant=Y.


#3

Hi,
I’m using Derby.
I increased my environment resources and now it’s working fine.

I would also like to know if creating different tenants is the best way of a multi company approach.
My use case is: Different companies that should not share their data (accounting, parties, products, inventories,…), but share the same Scipio SW instance.

Thanks!


#4

Theoretically that would be the ideal use-case for multi-tenancy and feel free to give it a try on your own.

However, I have to mention that i am unaware of a real-life client where the requirements really needed a multi-tenant setup and where not a simpler setup, like a few customized apps with a new registration workflow, would do. Be aware that the multi-tenant feature is therefore much less tested and you could run into issues along the way.


#5

Hi Madppiper,
Thank you for your answer.

  • What do you mean with simpler setup -> few customized apps and new registration wf?
  • Are the different companies going to be able to have their own data without sharing information with each other?
    I would appreciate if you can send me more details regarding your suggestion.

Thanks!


#6

Well, the installations i know off, where people implemented something similar ended up “not seperating” the data on a database level. Though that isn’t perfect, you can still restrict data access through other means.

It does require a custom application that you would need to design, but unlike the multi-tenant setup, it does have the benefit of the system not requiring an ant-command to setup new tenants.


#7

Ok.
If all the companies share the same database, is there any way to accomplish that each company access to their own data (e.g. using an “id company” attribute in some particular tables)?
In my use case the companies should have to access only to their own data (parties, products, inventories, accounting,…).

Thanks!


#8

yes, that is precisely it. Catalogs, inventories and so on are already connected to specific webstores, which in turn are assigned to Parties of their own (the companies). You can change the interfaces to make users only have the right to see and interact with companies they got access to.

Again, it will take custom implementation, but at least for the implementations i have seen, the clients ended up creating new components from scratch anyway, and just extended existing screens, or added new screens there. It is work, yes, but conceptually I honestly haven’t really seen too many implementations where a true multi-tenant setup was desired…

… and remember: you can always play around with multi-tenant as well. I am just not sure if it is the road I’d take for this…


#9

Thank you for your answers!