use of org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProvider 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);
}
}
}
use of org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProvider 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;
}
use of org.camunda.bpm.engine.impl.cfg.multitenancy.TenantIdProvider in project camunda-bpm-platform by camunda.
the class CaseExecutionEntity method provideTenantId.
protected void provideTenantId(Map<String, Object> variables) {
TenantIdProvider tenantIdProvider = Context.getProcessEngineConfiguration().getTenantIdProvider();
if (tenantIdProvider != null) {
VariableMap variableMap = Variables.fromMap(variables);
CaseDefinition caseDefinition = (CaseDefinition) getCaseDefinition();
TenantIdProviderCaseInstanceContext ctx = null;
if (superExecutionId != null) {
ctx = new TenantIdProviderCaseInstanceContext(caseDefinition, variableMap, getSuperExecution());
} else if (superCaseExecutionId != null) {
ctx = new TenantIdProviderCaseInstanceContext(caseDefinition, variableMap, getSuperCaseExecution());
} else {
ctx = new TenantIdProviderCaseInstanceContext(caseDefinition, variableMap);
}
tenantId = tenantIdProvider.provideTenantIdForCaseInstance(ctx);
}
}
Aggregations