14591460146114621463146414651466146714681469
.withCaseExecution(humanTaskExecutionId) .manualStart(); TaskQuery query = taskService.createTaskQuery(); query.caseInstanceId(caseInstanceId); verifyQueryResults(query, 1); } @Deployment(resources=
14911492149314941495149614971498149915001501
// then TaskQuery query = taskService.createTaskQuery(); query.caseInstanceId(caseInstanceId); verifyQueryResults(query, 2); for (Task task : query.list()) { assertEquals(caseInstanceId, task.getCaseInstanceId());
15111512151315141515151615171518151915201521
} public void testQueryByInvalidCaseInstanceId() { TaskQuery query = taskService.createTaskQuery(); query.caseInstanceId("invalid"); verifyQueryResults(query, 0); try { query.caseInstanceId(null);
15161517151815191520152115221523152415251526
query.caseInstanceId("invalid"); verifyQueryResults(query, 0); try { query.caseInstanceId(null); fail("expected exception"); } catch (ProcessEngineException e) { // OK } }