Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish event on order cancellation and adapt inventory and accountancy accordingly #230

Closed
odrotbohm opened this issue Nov 23, 2018 · 0 comments
Assignees
Milestone

Comments

@odrotbohm
Copy link
Member

We currently don't publish any event on order cancellation which actually leaves both the inventory and accountancy in invalid state. We should introduce such an event, revert the inventory update and create a compensating accountancy entry.

@odrotbohm odrotbohm self-assigned this Nov 23, 2018
@odrotbohm odrotbohm added this to the 7.1 milestone Nov 23, 2018
odrotbohm added a commit that referenced this issue Nov 23, 2018
…eral.

We now publish an OrderCancelled event if an Order instance is cancelled, potentially roll back the inventory updates and create a compensating ProductPaymentEntry in the accountancy.

Fixed event handling in accountancy to handle OrderPaid events, not OrderCompleted ones. Polished implementation of InventoryOrderEventListener by tweaking the APIs in OrderCompletionReport for better composability.

Added Order.addOrderLine(…) as a replacement for ….add(OrderLine) and added lookup method to find OrderLine instances by product as the Order doesn't deduplicate them like the Cart does.

Added notes on the published events to state transitioning methods in OrderManager.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant