//his表剩2个
assertEquals(2, processInstances.size());
//重置流程实例查询
processInstanceQuery = runtimeService.createProcessInstanceQuery();
processInstances = processInstanceQuery.processDefinitionKey("TaskServiceNewTest").his().run().list();
//run和his表共3个
assertEquals(5, processInstances.size());
//将大于5归档
historyService.archiveBetweenTime(end, null);