Flowable Multi-Tenancy: How to Assign Tenant Attribute to Queries Dynamically

I’m currently developing a project using Flowable that isn’t set up for multi-tenancy. I’m looking to assign a tenant attribute to all queries run by the application, without altering the existing code.

My goal is to have multiple backend instances, each catering to a distinct tenant, by pulling the tenant information from a configuration property.

I’ve thought about using a command interceptor to automatically set the tenant ID if it’s available, utilizing reflection. However, I’m not confident that this is the most efficient or effective solution.

Could you suggest an alternative method to define the application’s tenant for all queries, without requiring significant code modifications?

Hey @nidyran,

We do not have something out-of-the-box for this. What you could do is to provide a PR that is going to provide a hook point to achieve what you are looking for.