use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentQueryTest method testQueryByInvalidActivityId.
@Test
public void testQueryByInvalidActivityId() {
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
assertEquals(0, query.activityId("invalid").list().size());
assertEquals(0, query.activityId("invalid").count());
try {
query.activityId(null);
fail("It was possible to set a null value as activityId.");
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentQueryTest method testQueryByProcessInstanceId.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/oneFailingServiceProcess.bpmn20.xml" })
public void testQueryByProcessInstanceId() {
startProcessInstance(PROCESS_DEFINITION_KEY);
ProcessInstance pi = runtimeService.createProcessInstanceQuery().singleResult();
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery().processInstanceId(pi.getId());
assertEquals(1, query.list().size());
assertEquals(1, query.count());
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentQueryTest method testQueryByInvalidDeleted.
@Test
public void testQueryByInvalidDeleted() {
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
try {
query.deleted().deleted();
fail("It was possible to set a the deleted flag twice.");
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentQueryTest method testQueryByInvalidResolved.
@Test
public void testQueryByInvalidResolved() {
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
try {
query.resolved().resolved();
fail("It was possible to set a the resolved flag twice.");
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentQueryTest method testQueryByIncidentType.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/oneFailingServiceProcess.bpmn20.xml" })
public void testQueryByIncidentType() {
startProcessInstance(PROCESS_DEFINITION_KEY);
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery().incidentType(Incident.FAILED_JOB_HANDLER_TYPE);
assertEquals(1, query.list().size());
assertEquals(1, query.count());
}
Aggregations