Search in sources :

Example 1 with TenantIdProviderHistoricDecisionInstanceContext

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;
}
Also used : TenantIdProviderHistoricDecisionInstanceContext(org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProviderHistoricDecisionInstanceContext) TenantIdProvider(org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProvider)

Aggregations

TenantIdProvider (org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProvider)1 TenantIdProviderHistoricDecisionInstanceContext (org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProviderHistoricDecisionInstanceContext)1