use of org.camunda.bpm.engine.history.HistoricCaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricCaseInstanceQueryTest method testQueryByTenantId.
public void testQueryByTenantId() {
HistoricCaseInstanceQuery query = historyService.createHistoricCaseInstanceQuery().tenantIdIn(TENANT_ONE);
assertThat(query.count(), is(1L));
query = historyService.createHistoricCaseInstanceQuery().tenantIdIn(TENANT_TWO);
assertThat(query.count(), is(1L));
}
use of org.camunda.bpm.engine.history.HistoricCaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricCaseInstanceQueryTest method testQueryAuthenticatedTenant.
public void testQueryAuthenticatedTenant() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
HistoricCaseInstanceQuery query = historyService.createHistoricCaseInstanceQuery();
assertThat(query.count(), is(2L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(0L));
assertThat(query.tenantIdIn(TENANT_ONE, TENANT_TWO).count(), is(1L));
}
use of org.camunda.bpm.engine.history.HistoricCaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricCaseInstanceQueryTest method testQueryByTenantIds.
public void testQueryByTenantIds() {
HistoricCaseInstanceQuery query = historyService.createHistoricCaseInstanceQuery().tenantIdIn(TENANT_ONE, TENANT_TWO);
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricCaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricCaseInstanceQueryTest method testQueryByInstancesWithoutTenantId.
public void testQueryByInstancesWithoutTenantId() {
HistoricCaseInstanceQuery query = historyService.createHistoricCaseInstanceQuery().withoutTenantId();
assertThat(query.count(), is(1L));
}
use of org.camunda.bpm.engine.history.HistoricCaseInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricCaseInstanceQueryTest method testQueryDisabledTenantCheck.
public void testQueryDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
HistoricCaseInstanceQuery query = historyService.createHistoricCaseInstanceQuery();
assertThat(query.count(), is(3L));
}
Aggregations