Site identification by user

Site identification by user

  

Friends,

I have an application that is being used by one of our sites, Site 1,  and is working well for them, we have an additional site, Site 2, that will be using our application has had several new features and enhancements added for them that will not be used by Site 1.  Also Site 1 is not wanting Site 2 to see their data and vice versa.  I am trying to find best solution for having our application deployment work so that it is as seamless as possible for Site 1 since they use the application 24/7 and such that their operations are not interrupted.  I realize I may have to add a SiteID field to all of our external database tables, but for associating a user to which site they will belong to such they are not prompted at each log in, but ideally when the permissions are assigned on the initial set up.  What would be the best approach to achieve this?  Any examples would be greatly appreciated!  Also would there be any feature within the outsystems framework that may be able to handle this requirement?  Thank you in advance!

I do not quite understand your question. Do you just want to share some tables between the two sites?

Does Multi-tenant solve your problem?

The sites would share tables, but not share data, so they would be filtered by which site they belong to.  Does Multi-tenant achieve this?

Jason Waltman wrote:

The sites would share tables, but not share data, so they would be filtered by which site they belong to.  Does Multi-tenant achieve this?

Yes, if the data model is the same on both sites, you can use multi-tenant.


Hi Jason,

Multi tenant functionality is used when you want to have same functionalities to multiple clients with data separation. To accomplish this you need to mark your espaces as multi tenant, when you do this the outsystems framework will include a TenantId on every table by itself and you will not see that column on service studio. Because of this you will have the data separation. 

Since in Multi tenant all the tenants have the same functionalities you have another problem in your scenario, you want to have different functionalities for different clients. For this I would recommend a architecture like this:


Regards,

Marcelo

As additional information, you might want to check out the Multi-Tenancy Master Class and the Article, as it seems that Multi-Tenancy will definitely solve your problem.


Hope this helps!

   CLSJ

Thank you my friends, it seems as if the Multi-Tenancy function is the direction we will go in trying to achieve the requirements for our application.  though i do wonder, with our datbase and tables where we write our data to being external databases, would this be a problem with the Outsystems creating and reading the tenant ID.

Hi Jason,

If you have a external DB will be a lot harder to use muli tenancy because you need by yourself create the tenantId on those tables and manage that yourself. I dont think there is other way other than this. buy if anyone has any experience on this scenario let us know a better solution

Regards,

Marcelo

I am ok with creating the tenantID fields on all the tables and managing that myself.  I just wanted to make sure that outsystems recognizes that field as the tenantID as it would with an internal database.

I have been searching for a good example that would show how MultiTenant functionality works and seems to be a bit tricky.  Our application is on premise and our databases are external as well, i have watched the master class video and seems that there are a large set of pieces that I am missing to be able to figure out how to set MultiTenant up on our Application,  as we have many other applications hosted that we do not wish to set this functionality up on.  Would anyone be able to provide me with a good example as to how i could do this or would outsystems support be my best luck?

Hi Jason,

Did you read this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/How_to_Build_a_Multi-tenant_Application?

Basically you need to create various tenants. than you need to set your espaces to multi tenants and make sure that all the writes on the db save the tenantid there. And when you read you need to select only the ones of the tenant you are in.

Regards,

Marcelo

This doesn't cover how to configure the URL to redirect to the correct tenant, would there happen to be a comprehensive documentation that would cover all things that would be required to get set up?

Hi Jason,

This will help you with that: 

https://www.outsystems.com/forums/discussion/37378/unique-urls-per-tenant/

and 

https://www.youtube.com/watch?v=b-yG6hQ7hdk&feature=youtu.be&t=1889 

The youtube video the part of URL's is almost at the end but I recommend watch everything.

Regards,

Marcelo


Jason Waltman wrote:

I have been searching for a good example that would show how MultiTenant functionality works and seems to be a bit tricky.  Our application is on premise and our databases are external as well, i have watched the master class video and seems that there are a large set of pieces that I am missing to be able to figure out how to set MultiTenant up on our Application,  as we have many other applications hosted that we do not wish to set this functionality up on.  Would anyone be able to provide me with a good example as to how i could do this or would outsystems support be my best luck?


Multi-tenancy is done on a per-espace basis. So if you do not want an application to use it, then don't use it.

In terms of different URLs per site, that isn't necessary. When the user logs in, it knows what tenant that user belongs to and treats them as part of that tenant.

J.Ja