424425426427428429430431432433434
.manualStart(); // then HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); query.caseInstanceId(caseInstanceId); assertEquals(1, query.count()); assertEquals(1, query.list().size()); HistoricProcessInstance historicProcessInstance = query.singleResult();
483484485486487488489490491492493
.manualStart(); // then HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); query.caseInstanceId(caseInstanceId); assertEquals(2, query.count()); assertEquals(2, query.list().size()); for (HistoricProcessInstance hpi : query.list()) {
514515516517518519520521522523524
} public void testQueryByInvalidCaseInstanceId() { HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); query.caseInstanceId("invalid"); assertEquals(0, query.count()); assertEquals(0, query.list().size()); query.caseInstanceId(null);
519520521522523524525526527528529
query.caseInstanceId("invalid"); assertEquals(0, query.count()); assertEquals(0, query.list().size()); query.caseInstanceId(null); assertEquals(0, query.count()); assertEquals(0, query.list().size()); }