本文整理匯總了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);
}