use of org.camunda.bpm.engine.history.HistoricActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceAuthorizationTest method testSimpleQueryWithoutAuthorization.
// historic activity instance query /////////////////////////////////
public void testSimpleQueryWithoutAuthorization() {
// given
startProcessInstanceByKey(PROCESS_KEY);
// when
HistoricActivityInstanceQuery query = historyService.createHistoricActivityInstanceQuery();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.history.HistoricActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceAuthorizationTest method testSimpleQueryWithReadHistoryPermissionOnAnyProcessDefinition.
public void testSimpleQueryWithReadHistoryPermissionOnAnyProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
HistoricActivityInstanceQuery query = historyService.createHistoricActivityInstanceQuery();
// then
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.history.HistoricActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricActivityInstanceQueryTest method testQueryDisabledTenantCheck.
public void testQueryDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
HistoricActivityInstanceQuery query = historyService.createHistoricActivityInstanceQuery();
assertThat(query.count(), is(4L));
}
use of org.camunda.bpm.engine.history.HistoricActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricActivityInstanceQueryTest method testQueryWithoutTenantId.
public void testQueryWithoutTenantId() {
HistoricActivityInstanceQuery query = historyService.createHistoricActivityInstanceQuery();
assertThat(query.count(), is(4L));
}
use of org.camunda.bpm.engine.history.HistoricActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricActivityInstanceQueryTest method testQueryByNonExistingTenantId.
public void testQueryByNonExistingTenantId() {
HistoricActivityInstanceQuery query = historyService.createHistoricActivityInstanceQuery().tenantIdIn("nonExisting");
assertThat(query.count(), is(0L));
}
Aggregations