use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceAuthorizationTest method testSimpleQueryWithReadHistoryPermissionOnAnyProcessDefinition.
public void testSimpleQueryWithReadHistoryPermissionOnAnyProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricVariableInstanceQueryTest method testQueryWithoutTenantId.
public void testQueryWithoutTenantId() {
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricVariableInstanceQueryTest method testQueryByTenantId.
public void testQueryByTenantId() {
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery().tenantIdIn(TENANT_ONE);
assertThat(query.count(), is(1L));
assertEquals(query.list().get(0).getValue(), TENANT_ONE_VAR);
query = historyService.createHistoricVariableInstanceQuery().tenantIdIn(TENANT_TWO);
assertThat(query.count(), is(1L));
assertEquals(query.list().get(0).getValue(), TENANT_TWO_VAR);
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricVariableInstanceQueryTest method testQueryByTenantIds.
public void testQueryByTenantIds() {
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery().tenantIdIn(TENANT_ONE, TENANT_TWO);
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricVariableInstanceQueryTest method testQueryDisabledTenantCheck.
public void testQueryDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
assertThat(query.count(), is(2L));
}
Aggregations