use of org.camunda.bpm.engine.runtime.IncidentQuery in project camunda-bpm-platform by camunda.
the class IncidentQueryTest method testQueryByInvalidExecutionId.
@Test
public void testQueryByInvalidExecutionId() {
IncidentQuery query = runtimeService.createIncidentQuery().executionId("invalid");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertTrue(incidents.isEmpty());
Incident incident = query.singleResult();
assertNull(incident);
}
use of org.camunda.bpm.engine.runtime.IncidentQuery in project camunda-bpm-platform by camunda.
the class IncidentQueryTest method testQueryByProcessDefinitionId.
public void testQueryByProcessDefinitionId() {
String processDefinitionId = engineRule.getRepositoryService().createProcessDefinitionQuery().singleResult().getId();
IncidentQuery query = runtimeService.createIncidentQuery().processDefinitionId(processDefinitionId);
assertEquals(4, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(4, incidents.size());
}
use of org.camunda.bpm.engine.runtime.IncidentQuery in project camunda-bpm-platform by camunda.
the class IncidentQueryTest method testQueryByActivityId.
public void testQueryByActivityId() {
IncidentQuery query = runtimeService.createIncidentQuery().activityId("theServiceTask");
assertEquals(4, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(4, incidents.size());
}
use of org.camunda.bpm.engine.runtime.IncidentQuery in project camunda-bpm-platform by camunda.
the class IncidentQueryTest method testQueryByInvalidProcessDefinitionId.
@Test
public void testQueryByInvalidProcessDefinitionId() {
IncidentQuery query = runtimeService.createIncidentQuery().processDefinitionId("invalid");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertTrue(incidents.isEmpty());
Incident incident = query.singleResult();
assertNull(incident);
}
use of org.camunda.bpm.engine.runtime.IncidentQuery in project camunda-bpm-platform by camunda.
the class IncidentQueryTest method testQuery.
@Test
public void testQuery() {
IncidentQuery query = runtimeService.createIncidentQuery();
assertEquals(4, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(4, incidents.size());
}
Aggregations