本文整理汇总了Java中org.camunda.bpm.engine.runtime.IncidentQuery.list方法的典型用法代码示例。如果您正苦于以下问题:Java IncidentQuery.list方法的具体用法?Java IncidentQuery.list怎么用?Java IncidentQuery.list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.runtime.IncidentQuery
的用法示例。
在下文中一共展示了IncidentQuery.list方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIncidents
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Override
public List<IncidentDto> getIncidents(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
IncidentQueryDto queryDto = new IncidentQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
IncidentQuery query = queryDto.toQuery(processEngine);
List<Incident> queryResult;
if (firstResult != null || maxResults != null) {
queryResult = executePaginatedQuery(query, firstResult, maxResults);
} else {
queryResult = query.list();
}
List<IncidentDto> result = new ArrayList<IncidentDto>();
for (Incident incident : queryResult) {
IncidentDto dto = IncidentDto.fromIncident(incident);
result.add(dto);
}
return result;
}
示例2: testQuery
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQuery() {
IncidentQuery query = runtimeService.createIncidentQuery();
assertEquals(4, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(4, incidents.size());
}
示例3: testQueryByIncidentType
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByIncidentType() {
IncidentQuery query = runtimeService.createIncidentQuery().incidentType(Incident.FAILED_JOB_HANDLER_TYPE);
assertEquals(4, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(4, incidents.size());
}
示例4: testQueryByInvalidIncidentType
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByInvalidIncidentType() {
IncidentQuery query = runtimeService.createIncidentQuery().incidentType("invalid");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertTrue(incidents.isEmpty());
Incident incident = query.singleResult();
assertNull(incident);
}
示例5: testQueryByInvalidIncidentMessage
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByInvalidIncidentMessage() {
IncidentQuery query = runtimeService.createIncidentQuery().incidentMessage("invalid");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertTrue(incidents.isEmpty());
Incident incident = query.singleResult();
assertNull(incident);
}
示例6: testQueryByProcessDefinitionId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
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());
}
示例7: testQueryByUnknownJobDefinitionId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByUnknownJobDefinitionId() {
IncidentQuery query = runtimeService.createIncidentQuery().jobDefinitionIdIn("unknown");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertEquals(0, incidents.size());
}
示例8: testQueryByProcessInstanceId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
public void testQueryByProcessInstanceId() {
IncidentQuery query = runtimeService.createIncidentQuery().processInstanceId(processInstanceIds.get(0));
assertEquals(1, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(1, incidents.size());
Incident incident = query.singleResult();
assertNotNull(incident);
}
示例9: testQueryByInvalidProcessInstanceId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByInvalidProcessInstanceId() {
IncidentQuery query = runtimeService.createIncidentQuery().processInstanceId("invalid");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertTrue(incidents.isEmpty());
Incident incident = query.singleResult();
assertNull(incident);
}
示例10: testQueryByIncidentId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByIncidentId() {
Incident incident= runtimeService.createIncidentQuery().processInstanceId(processInstanceIds.get(0)).singleResult();
assertNotNull(incident);
IncidentQuery query = runtimeService.createIncidentQuery().incidentId(incident.getId());
assertEquals(1, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(1, incidents.size());
}
示例11: testQueryByInvalidIncidentId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByInvalidIncidentId() {
IncidentQuery query = runtimeService.createIncidentQuery().incidentId("invalid");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertTrue(incidents.isEmpty());
Incident incident = query.singleResult();
assertNull(incident);
}
示例12: testQueryByExecutionId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
public void testQueryByExecutionId() {
Execution execution = runtimeService.createExecutionQuery().processInstanceId(processInstanceIds.get(0)).singleResult();
assertNotNull(execution);
IncidentQuery query = runtimeService.createIncidentQuery().executionId(execution.getId());
assertEquals(1, query.count());
List<Incident> incidents = query.list();
assertFalse(incidents.isEmpty());
assertEquals(1, incidents.size());
}
示例13: testQueryByInvalidExecutionId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@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);
}
示例14: testQueryByActivityId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
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());
}
示例15: testQueryByInvalidActivityId
import org.camunda.bpm.engine.runtime.IncidentQuery; //导入方法依赖的package包/类
@Test
public void testQueryByInvalidActivityId() {
IncidentQuery query = runtimeService.createIncidentQuery().activityId("invalid");
assertEquals(0, query.count());
List<Incident> incidents = query.list();
assertTrue(incidents.isEmpty());
Incident incident = query.singleResult();
assertNull(incident);
}