Why is my TenantProvider not working

I implemented the DefaultTenantProvider and added it to the SpringBoot configuration, but it doesn’t work properly。

Why aren’t my methods called when using RepositoryService, Runtime Service, TaskService, and so on?Do I still need to specify TENANT-ID myself? What is the significance of implementing DefaultTenantProvider for me?
SpringBoot Version:2.2.3.RELEASE
Flowable Version:6.7.2

Hey @qiaoyuanshuai,

The DefaultTenantProvider is used when definitions are looked up by key for a specific tenant. e.g. when starting a process instance with a particular definition key in tenant A, if the definition does not exist in tenant A then the default tenant provider will be used to determine the fallback tenant.

In order to enable this fallback you’ll also need to set fallbackToDefaultTenant to true.

Cheers,
Filip

@filiphr
If I want to implement filtering between different tenants, do I need to manually specify TENANT-ID when calling RepositoryService, Runtime Service, TaskService?

I thought that after implementing this DefaultTenantProvider, it would automatically add this condition to filter when I call the servant provided by Flowable

Yes you will manually have to provide the tenant id when querying.

That’s not what this is meant for.

Thank you very much!This has helped me a lot.