use of org.camunda.bpm.engine.runtime.ProcessInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyProcessInstanceQueryTest method testQueryDisabledTenantCheck.
public void testQueryDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery();
assertThat(query.count(), is(3L));
}
use of org.camunda.bpm.engine.runtime.ProcessInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyProcessInstanceQueryTest method testQueryAuthenticatedTenants.
public void testQueryAuthenticatedTenants() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery();
assertThat(query.count(), is(3L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
assertThat(query.withoutTenantId().count(), is(1L));
}
use of org.camunda.bpm.engine.runtime.ProcessInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyProcessInstanceQueryTest method testQueryAuthenticatedTenant.
public void testQueryAuthenticatedTenant() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery();
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.runtime.ProcessInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyProcessInstanceQueryTest method testQueryByTenantIds.
public void testQueryByTenantIds() {
ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().tenantIdIn(TENANT_ONE, TENANT_TWO);
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.runtime.ProcessInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyProcessTaskTest method testProcessRefTenantIdConstant.
public void testProcessRefTenantIdConstant() {
deployment(CMMN_TENANT_CONST);
deploymentForTenant(TENANT_ONE, PROCESS);
caseService.withCaseDefinitionByKey("testCase").create();
ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processDefinitionKey("testProcess");
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
Aggregations