protected List<PurchaseOrder> doInBackground() throws Exception {
List<PurchaseOrder> updated = new ArrayList<PurchaseOrder>();
EntityDataModel<PurchaseOrder> orders = _orders.getDataModel();
int n = orders.getRowCount();
for (int i = 0; i < n; i++) {
PurchaseOrder order = orders.getRow(i);
if (order.getStatus() == PurchaseOrder.Status.PENDING) {
updated.add(_service.deliver(order));
}
}
return updated;
}