use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseTaskTest method testCaseRefTenantIdExpression.
public void testCaseRefTenantIdExpression() {
deployment(CMMN_TENANT_EXPR);
deploymentForTenant(TENANT_ONE, CMMN_CASE);
caseService.withCaseDefinitionByKey("caseTaskCase").create();
CaseInstanceQuery query = caseService.createCaseInstanceQuery().caseDefinitionKey("oneTaskCase");
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseTaskTest method testCaseRefTenantIdConstant.
public void testCaseRefTenantIdConstant() {
deployment(CMMN_TENANT_CONST);
deploymentForTenant(TENANT_ONE, CMMN_CASE);
caseService.withCaseDefinitionByKey("caseTaskCase").create();
CaseInstanceQuery query = caseService.createCaseInstanceQuery().caseDefinitionKey("oneTaskCase");
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseInstanceQueryTest method testQueryDisabledTenantCheck.
public void testQueryDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
CaseInstanceQuery query = caseService.createCaseInstanceQuery();
assertThat(query.count(), is(3L));
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseInstanceQueryTest method testQueryByTenantId.
public void testQueryByTenantId() {
CaseInstanceQuery query = caseService.createCaseInstanceQuery().tenantIdIn(TENANT_ONE);
assertThat(query.count(), is(1L));
query = caseService.createCaseInstanceQuery().tenantIdIn(TENANT_TWO);
assertThat(query.count(), is(1L));
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseInstanceQueryTest method testQueryByNonExistingTenantId.
public void testQueryByNonExistingTenantId() {
CaseInstanceQuery query = caseService.createCaseInstanceQuery().tenantIdIn("nonExisting");
assertThat(query.count(), is(0L));
}
Aggregations