Blog

EventStorming and how to monitor Domain Events for product management

22 Oct, 2018
Xebia Background Header Wave

We design, model, and create software to solve a problem for our customer (this can also be a customer from within the same company). Only when we do so, we focus naturally on solving the happy path and want to deliver that value as soon as possible. The only problem here is that we will always come to a point where we get corner cases or business exceptions, and the question starts to arise, what shall we do? Is it worth the effort to invest in building a solution for this, or can we leave this function out of the system because it is not worth it? To answer these question, we want, if possible, feedback from the system to know this. We can quickly get this feedback making it explicit in the form of a Domain Event during our EventStorming and start monitoring it. This way we can leave the options open until we know what to do.

Domain Driven Design, Domain Events and EventStorming

Domain Events is a tactical pattern from Domain Driven Design. It is not in the original book, but created later and is documented in the reference book as ‘something happened that domain experts care about’. It is the central concept used in EventStorming. EventStorming is a flexible workshop format for collaborative exploration of complex business domains. For our example today we will be using EventStorming to show you how we can leverage it to find these Domain Events to monitor. The domain we use is the cinema, and the problem is letting customers buy tickets and reserve seats for a particular screening of a movie. We start with a Domain Event telling us that a customer wants to buy some tickets. The Domain Event resolves in tickets requested event and starts of our reservation process.

When we start the reservation process, we do this by reserving the number of seats requested by the customer. Now we have several consistent business rules in place when we do the action. It means that there is no contradiction, in this case, we want to only have one person per seat, only adjacent seating and max eight tickets per customer. The one seat per person seems logical, but when booking an aeroplane ticket, they usually overbook the plain, and that means that this rule does not apply. We want to be explicit about every rule that, these affect our modelling. Now when we take the second rule, only adjacent seating, we can get a corner case or business exception. The question will arise, what do we do when there is enough seating left, but they are not adjacent?

What we want to do is make this question explicit in our EventStorm so that we can talk about visual things. So we want to create a Domain Event from it and add a question on it. Now while discussing this question, the developers will most likely tell that implementing this flow will cost some time and effort. At this point, we have no feedback data of how many times this will happen, let alone know how many of our users are okay with no adjacent seatings. So before jumping in and solve this problem we want to gain feedback. We want to find a way in where we can still be customer friendly, and also get feedback if we need to implement this. So a possible solution would be to monitor the Domain Event and react on it by telling the user that this option is not available at the moment, but ask them if they do want this. A story like this won’t cost a lot to implement, and we can get it fast to production. Now we can get quickly, timely, reliable feedback and adjust our backlog accordingly. We now can know if the investment in solving this exception is worth it or not.
UPDATE:
After a great discussion on twitter on the word exceptions that I used in the intro, I update it to corner cases or business exceptions. Also, Jeremie Chassaing blogged about the subject.
Also, this post is published on my personal blog site.

Kenny Baas-Schwegler
A lot of knowledge is lost when designing and building software — lost because of hand-overs in a telephone game, confusing communication by not having a shared language, discussing complexity without visualisation and by not leveraging the full potential and wisdom of the diversity of the people. That lost knowledge while creating software impacts the sustainability, quality and value of the software product. Kenny Baas-Schwegler is a strategic software delivery consultant and software architect with a focus on socio-technical systems. He blends IT approaches like Domain-Driven Design and Continuous Delivery and facilitates change with Deep Democracy by using visual and collaborative modelling practices like Eventstorming, Wardley mapping, context mapping and many more. Kenny empowers and collaboratively enables organisations, teams and groups of people in designing, architecting and building sustainable quality software products. One of Kenny's core principles is sharing knowledge. He does that by writing a blog on his website baasie.com and helping curate the Leanpub book visual collaboration tool. Besides writing, he also shares experience in the Domain-Driven Design community as an organiser of Virtual Domain-Driven Design (virtualddd.com) and Domain Driven Design Nederland. He enjoys being a public speaker by giving talks and hands-on workshops at conferences and meetups.
Questions?

Get in touch with us to learn more about the subject and related solutions

Explore related posts