Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Need Help on how to implement custom code by tenant #4546


User avatar
0
mmukkara created

HI Guys,

I am assuming most of you are implementing multi-tenant based system using ABP. This question may not be related to ABP, just trying to figure out how to use it in ABP. I need your help and suggestions on how to implement custom code by tenant. Some tenants have different business rules, entity logic etc., compared to others. How is the work flow of the code execution defined by tenant. How to implement separation of code by tenant custom logic. By the way, I am using Angular version of ABP.

Any suggestions and pointers to documents will be appreciated.

Apart from above question, Anyone integrated workflow component or rules engines to ABP. If so, can you make some suggestions.

Looking for some architectural guidelines for multi-tenant applications.

Thanks


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mmukkara,

    I'm not sure if I understand it correctly but you can create a default implementation for your use case, for example lets say we have a product management use case, then ProductManager.

    public class ProductManager : IProductManager
    {
    
    }
    

    Then, if you want to customize it for a specific tenant, you can define

    public class Tenant1ProductManager : IProductManager
    {
    
    }
    

    Then, you can select correct class using the current tenant information via a factory class and dependency inecjtion or reflection.

    Of course there are probably some other steps but this can give you a basic idea.

    I'm sure there are other ways but this is the first one comes to my mind :).