if (entityExists(ref.getId())) {
return new WorkflowEntity(ref.getId(), context);
}
} catch (SQLException ex) {
throw new EntityException("Internal server error", "SQL error", 500);
} finally {
removeConn(context);
}
throw new IllegalArgumentException("Invalid id:" + ref.getId());
}