2 processes with same key, for global and tenant deployments

Hello,

I am in process of designing multi-tenant architecture for my product. My requirement is

  • We will have default global shared process
  • If a tenant needs, this default global process will be modified and deployed ONLY for this tenant (both global and tenant process should have same process key)

My overall requirement is tenant applications will trigger process by providing tenant id and process key. System should trigger tenant deployed process if present (i.e. customized process), or else it should trigger global shared process (i.e. default process), client application should not worry whether they are calling default or tenant-customized process, it should be transparent to them and should he handled by camunda.

Can experts provide me pointers to achieve such behavior? Is it possible to deploy tenant specific and shared process at same time using same process key?

Are you trying to have camunda choose whether to use a “global” or “tenant” specific process? Or is this selection being determined by your application?

Hi @Techcoze,

if you use a single process engine with tenant-identifiers then you can deploy processes with the same key for different tenants.

But if you want to start a process by key then you must decide if you want to start the “global” or tenant-specific process. The process engine provides no fallback mechanism if the process isn’t deployed with the given tenant-identifier. You have to build this part by your own.

Please have a look at the User Guide to see how to deal with “global” (i.e. shared) definitions.

Does this help you?

Best regards,
Philipp

1 Like

Thanks Philipp for detailed explanation!
So it’s clear that i can deploy global + tenant processes with same key, but i will have to decide which one to instanciate, camunda will not take this decision in its own. I think we can solve this problem by writting intermediate adapter between camunda apis and client app. Client app will just send process key + tenant id to this adapter, adapter will decide whether to trigger global or tenant process based on deployments. This way i can make process customization completely transparent to client apps.