Document doc = toDoc(wInst);
writer.addDocument(doc);
} catch (IOException e) {
LOG.log(Level.WARNING, "Unable to index workflow instance: ["
+ wInst.getId() + "]: Message: " + e.getMessage());
throw new InstanceRepositoryException(
"Unable to index workflow instance: [" + wInst.getId()
+ "]: Message: " + e.getMessage());
} finally {
try {
writer.close();