use of org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProviderHistoricDecisionInstanceContext in project camunda-bpm-platform by camunda.
the class DefaultDmnHistoryEventProducer method provideTenantId.
protected String provideTenantId(DecisionDefinition decisionDefinition, HistoricDecisionInstanceEntity event) {
TenantIdProvider tenantIdProvider = Context.getProcessEngineConfiguration().getTenantIdProvider();
String tenantId = null;
if (tenantIdProvider != null) {
TenantIdProviderHistoricDecisionInstanceContext ctx = null;
if (event.getExecutionId() != null) {
ctx = new TenantIdProviderHistoricDecisionInstanceContext(decisionDefinition, getExecution(event));
} else if (event.getCaseExecutionId() != null) {
ctx = new TenantIdProviderHistoricDecisionInstanceContext(decisionDefinition, getCaseExecution(event));
} else {
ctx = new TenantIdProviderHistoricDecisionInstanceContext(decisionDefinition);
}
tenantId = tenantIdProvider.provideTenantIdForHistoricDecisionInstance(ctx);
}
return tenantId;
}
Aggregations