return ret;
}
public InstanceInfoListDocument listInstancesSummary(String filter, String order, int limit) {
InstanceInfoListDocument ret = InstanceInfoListDocument.Factory.newInstance();
final TInstanceInfoList infolist = ret.addNewInstanceInfoList();
if(garbage(filter)) {
return ret;
}
final InstanceFilter instanceFilter = new InstanceFilter(filter, order, limit);
try {
_db.exec(new BpelDatabase.Callable<Object>() {
public Object run(BpelDAOConnection conn) {
Collection<ProcessInstanceDAO> instances = conn.instanceQuery(instanceFilter);
Map<Long, Collection<CorrelationSetDAO>> icsets = conn.getCorrelationSets(instances);
for (ProcessInstanceDAO instance : instances) {
TInstanceInfo info = infolist.addNewInstanceInfo();
fillInstanceSummary(info, instance);
Collection<CorrelationSetDAO> csets = icsets.get(instance.getInstanceId());
if (csets != null) {
for (CorrelationSetDAO cset: csets) {
Map<QName, String> props = cset.getProperties();