Napoleon
unread,Aug 2, 2011, 2:21:49 AM8/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DDD/CQRS
Hi all,
I have the following workflow:
After a user has entered its details, he chooses a product he wishes
to buy. When the product has been selected, and product options
entered, a quote service will be called to figure out how much the
product is going to be. The price may vary on the options selected,
but also, the quote service may return some invalid selection errors
depending on the user details (such as the user's age).
My question is, should the quote service be called before the domain
event is published (i.e. UserHasChoosenAProductEvent) and thus giving
the UI a chance to display the potential quote service errors, or
should I publish the event, and let a consumer call the quote service.
If the latter, I would imagine that the error returned should then be
stored alongside the quote record to be displayed in another view.
Or is there a better approach?
Y.