Can Camunda start tenant-id specific project or default otherwise

/process-definition/key/{key}/tenant-id/{tenant-id}/start
Can Camunda start {tenant-id} project with {key}? If it is not found - just start shared project with {key}. Return error otherwise?

Or the only solution is like this: https://github.com/camunda/camunda-bpm-examples/tree/master/multi-tenancy/tenant-identifier-shared-definitions

Hi @Andrey_Falkov,

There is to my knowledge no such REST API endpoint.

I don’t think this example does what you want, if I understand you correctly. I recommend to implement a custom REST endpoint that selects the process definition by the logic you desire. Here is some docs on extending the REST API: Embed the API | docs.camunda.org. Thanks to the sub-resource concept, all you have to implement is the logic that selects the process definition (like here in the default implementation: camunda-bpm-platform/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/impl/ProcessDefinitionRestServiceImpl.java at master · camunda/camunda-bpm-platform · GitHub). The logic for starting the instance comes then for free via ProcessDefinitionResourceImpl.

Cheers,
Thorben

Thank you!

Let’s say I start a default process with a tenant-id variable set. And I want each Call Activity (BPMN/CMMN) or Business Rule Task (DMN) to use tenant-id definition or default definition (if tenant-id definition is not available).

Is setting Tenant Id to ${ calledElementTenantIdProvider.resolveTenantId(tenant-id) }" is the only solution here?

Yes, I think this is the way to go. If you want this to be the default behavior for each and every process definition, you can configure this programmatically via a parse listener as well, which saves the effort of editing the BPMN XML.

Cheers,
Thorben

Thank you for all your help!

I still think it should be a default behavior for Camunda (to pick a default process or a tenant specific one if available).

Would you please point to a documentation/example/best practice how to substitute Call Activity (BPMN/CMMN/DMN) tenant-id from input variable tenant-id if specific definition (BPMN/CMMN/DMN) is available for tenant-id?

Thank you for all your support…