}
public ProcessInfoListDocument listProcessesCustom(String filter, String orderKeys,
final ProcessInfoCustomizer custom) {
ProcessInfoListDocument ret = ProcessInfoListDocument.Factory.newInstance();
final TProcessInfoList procInfoList = ret.addNewProcessInfoList();
final ProcessFilter processFilter = new ProcessFilter(filter, orderKeys);
try {
_db.exec(new BpelDatabase.Callable<Object>() {
public Object run(BpelDAOConnection conn) throws Exception {
Collection<ProcessConf> pconfs = processQuery(processFilter);
for (ProcessConf pconf : pconfs) {
try {
fillProcessInfo(procInfoList.addNewProcessInfo(), pconf, custom);
} catch (Exception e) {
failIfSQLException(e);
__log.error("Exception when querying process " + pconf.getProcessId(), e);
}
}
try {
fillProcessInfoSummary(conn, procInfoList.getProcessInfoArray(), custom);
} catch (Exception e) {
failIfSQLException(e);
__log.error("Exception fetching instances summary", e);
}
return null;