use of org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProviderProcessInstanceContext in project camunda-bpm-platform by camunda.
the class ExecutionEntity method provideTenantId.
protected void provideTenantId(Map<String, Object> variables) {
if (tenantId == null) {
TenantIdProvider tenantIdProvider = Context.getProcessEngineConfiguration().getTenantIdProvider();
if (tenantIdProvider != null) {
VariableMap variableMap = Variables.fromMap(variables);
ProcessDefinition processDefinition = getProcessDefinition();
TenantIdProviderProcessInstanceContext ctx;
if (superExecutionId != null) {
ctx = new TenantIdProviderProcessInstanceContext(processDefinition, variableMap, getSuperExecution());
} else if (superCaseExecutionId != null) {
ctx = new TenantIdProviderProcessInstanceContext(processDefinition, variableMap, getSuperCaseExecution());
} else {
ctx = new TenantIdProviderProcessInstanceContext(processDefinition, variableMap);
}
tenantId = tenantIdProvider.provideTenantIdForProcessInstance(ctx);
}
}
}
Aggregations