use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentQueryTest method testQueryByActivityId.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/oneFailingServiceProcess.bpmn20.xml" })
public void testQueryByActivityId() {
startProcessInstance(PROCESS_DEFINITION_KEY);
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery().activityId("theServiceTask");
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 testQueryByOpen.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/oneFailingServiceProcess.bpmn20.xml" })
public void testQueryByOpen() {
startProcessInstance(PROCESS_DEFINITION_KEY);
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery().open();
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 testQueryByInvalidOpen.
@Test
public void testQueryByInvalidOpen() {
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
try {
query.open().open();
fail("It was possible to set a the open flag twice.");
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentQueryTest method testQueryByResolved.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/oneFailingServiceProcess.bpmn20.xml" })
public void testQueryByResolved() {
startProcessInstance(PROCESS_DEFINITION_KEY);
String jobId = managementService.createJobQuery().singleResult().getId();
managementService.setJobRetries(jobId, 1);
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery().resolved();
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 testQueryByInvalidProcessInstanceId.
@Test
public void testQueryByInvalidProcessInstanceId() {
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
assertEquals(0, query.processInstanceId("invalid").list().size());
assertEquals(0, query.processInstanceId("invalid").count());
try {
query.processInstanceId(null);
fail("It was possible to set a null value as processInstanceId.");
} catch (ProcessEngineException e) {
}
}
Aggregations