Search code examples
javaactivitibpmn

Activiti set tenantId for instance of shared process definition


I am currently considering using Activiti or Camunda in my project. In Camunda I can set a tenantId later on using a so called TenantProvider that is registered upon creating the process engine. I use this to set a tenant to an instance of a shared process definition.

Is this possible in Activiti in one way or another? I found the following call does NOT set the tenant correctly but sets empty string (I believe this is the default tenantId in Activiti since null gives problems with some databases):

this.runtimeService.createProcessInstanceBuilder()
            .processDefinitionId(processDefinitionId)
            .tenantId(tenantId)
            .start();

I use Activiti 6.0.0

PS: I should maybe add for clarification that the deployment and therefore the process definition does NOT have a tenantId because I want it to be used by all tenants.


Solution

  • I asked the same question in the alfresco forum and I was told that this is not possible:

    https://hub.alfresco.com/t5/alfresco-process-services/set-tenantid-for-instance-of-shared-process-definition/m-p/294535#M5921