Link reservationLink = new Link(new UriTemplate("http://warehouse-web/v1/reservations/{id}")
.with("id", TemplateVariable.VariableType.PATH_VARIABLE)
.expand(reservationId)
.toString()).withRel("reservation");
try {
<BUG>order.sendAsyncEvent(new OrderEvent(OrderEventType.INVENTORY_RESERVED, order), reservationLink);
</BUG>
} catch (Exception ex) {
log.error("Could not add reservation to order", ex);
order.getReservationIds().remove(reservationId);

Link reservationLink = new Link(new UriTemplate("http://warehouse-web/v1/reservations/{id}")
.with("id", TemplateVariable.VariableType.PATH_VARIABLE)
.expand(reservationId)
.toString()).withRel("reservation");
try {
order.sendAsyncEvent(new OrderEvent(OrderEventType.RESERVATION_ADDED, order), reservationLink);
} catch (Exception ex) {
log.error("Could not add reservation to order", ex);
order.getReservationIds().remove(reservationId);
