use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDetailVariableUpdateQueryTest method testQueryNoAuthenticatedTenants.
public void testQueryNoAuthenticatedTenants() {
identityService.setAuthentication("user", null, null);
HistoricDetailQuery query = historyService.createHistoricDetailQuery();
assertThat(query.count(), is(0L));
}
use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDetailVariableUpdateQueryTest method testQueryByTenantId.
public void testQueryByTenantId() {
HistoricDetailQuery query = historyService.createHistoricDetailQuery().variableUpdates().tenantIdIn(TENANT_ONE);
assertThat(query.count(), is(2L));
query = historyService.createHistoricDetailQuery().variableUpdates().tenantIdIn(TENANT_TWO);
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class HistoricDetailQueryTest method testQueryByInvalidExecutionId.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" })
public void testQueryByInvalidExecutionId() {
startProcessInstance(PROCESS_KEY);
String taskId = taskService.createTaskQuery().singleResult().getId();
// when
taskService.resolveTask(taskId, getVariables());
// then
HistoricDetailQuery query = historyService.createHistoricDetailQuery().executionId("invalid");
assertEquals(0, query.list().size());
assertEquals(0, query.count());
}
use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class HistoricDetailQueryTest method testQueryByInvalidUserOperationId.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" })
public void testQueryByInvalidUserOperationId() {
startProcessInstance(PROCESS_KEY);
String taskId = taskService.createTaskQuery().singleResult().getId();
// when
taskService.resolveTask(taskId, getVariables());
// then
HistoricDetailQuery query = historyService.createHistoricDetailQuery().userOperationId("invalid");
assertEquals(0, query.list().size());
assertEquals(0, query.count());
try {
query.userOperationId(null);
fail("It was possible to set a null value as userOperationId.");
} catch (ProcessEngineException e) {
}
}
Aggregations