04-14-2014 05:15 PM
List<String> estados = new ArrayList<String>();
estados.add("Status 1");
estados.add("Status 2"); // etc
List<String> list = new ArrayList<String>();
HistoricProcessInstanceQuery hQuery = historyService.createHistoricProcessInstanceQuery().processDefinitionKey("process_pool1");
if(hQuery != null) {
for(String estado : estados) {
List<HistoricProcessInstance> hProcess = hQuery.finished()
.includeProcessVariables()
.variableValueEquals("estado", estado).list();//.listPage(offset, limit);
if(hProcess != null && hProcess.size() > 0) {
for(HistoricProcessInstance hInst : hProcess) {
//System.out.println((String)hInst.getProcessVariables().get("variable"));
list.add((String)hInst.getProcessVariables().get("variable"));
}
}
// Reinstante it or it won't work…
hQuery = historyService.createHistoricProcessInstanceQuery().processDefinitionKey("process_pool1");
}
}
.variableValueEquals("estado", estado).list();//.listPage(offset, limit);
listPage(0, 10) it returns nothing. listPage(10, 10) it returns nothing.listPage(20, 10) it returns one of the two records…04-22-2014 06:35 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.