OMElement taskElement = expectElement(rootQueue, "task");
if (taskElement == null)
break;
try {
Task task = new TaskUnmarshaller().unmarshalTaskFromMetadata(taskElement);
tasks.add(task);
} catch (Exception e) {
_log.error("Error reading task: " + taskElement, e);
}
}