Skip to content

Event modeling in Studio

Event modeling is a way to describe how a system behaves by laying the whole story out on one timeline: what people do, what the system records, and what people see afterwards. Studio’s event model board is where a team draws that timeline together.

You do not need to know anything about software design to read one. If you can follow a storyboard, you can follow an event model.

Most misunderstandings in a project are not about code. They are about what the business actually does, and in which order. An event model gives product owners, domain experts, designers and developers one picture that all of them can check.

  • Everyone speaks the same words. Things on the board are named in the language of the business: Add to basket, Order placed.
  • The whole behavior is visible. Nothing hides in a hallway conversation or a developer’s head. If something happens in the system, it is on the board.
  • Gaps show early. A screen that shows data nothing ever records, or a step nobody triggers, stands out on the timeline long before anyone builds it.
  • The model can be checked. Each piece of behavior can carry examples, and Studio can run the model to see how it behaves.

A board reads left to right, as time passes. A shopper opens a page, then puts something in a basket, then checks out. Each step lands to the right of the one before.

Everything on the board is one of a few kinds of element, and each has its own color in Studio:

Element Color What it is How it is named
Command Blue Something a person or the system asks for. It can be refused. An instruction: AddToBasket
Event Orange Something that happened. A fact that is never taken back. Past tense: BasketLineAdded
Read model Green What someone looks at afterwards, built from events. A noun: BasketContents
Sticky note Yellow A question, a risk or a thought that has no home in the model yet. Plain words

Screens, automations and translations also appear on the board, and later pages explain them. The first three are the heart of it: a command goes in, an event comes out, and a read model shows the result.

Here is one step of the Acme Commerce shop, the sample project that this documentation uses throughout. A shopper adds a mug to their basket:

The shopper presses a button on a screen, which asks for AddToBasket. The shop accepts the request and records the fact BasketLineAdded. The basket page then shows BasketContents, which is built from everything that has been added.

Rows on the board belong to who does the work. A row for the Shopper holds what the shopper sees and asks for, and the system has a row of its own for the things it does without being asked. Events sit in a row of their own, so the facts of the system read as one running history.

STATE CHANGE AddToBasket STATE VIEW BasketView STATE CHANGE CheckOut AUTOMATION EmptyBasketAfterCheckout SHOPPER SYSTEM COMMANDS AND VIEWS EVENTS TIME SCREEN AddToBasketDialog COMMAND AddToBasket EVENT BasketLineAdded READ MODEL BasketContents SCREEN Basket SCREEN Checkout COMMAND CheckOut EVENT CheckoutCompleted AUTOMATION ClearBasket EVENT BasketCleared
A piece of the Storefront board. Each column is one slice; the rows say who acts, what is asked for or shown, and what happened.

Studio follows the event modeling method closely. It adds the things a team needs to keep a model alive: roles, checks and a way to carry on to working software.

In the method In Studio
The timeline The board, read left to right
A step in the story A slice: one column with one behavior
Swimlanes for people and systems Rows that belong to actors
Screens and wireframes Screens attached to slices, and the design canvas
Grouping a big model Modules and features
Examples that prove a step works Specifications written as Given, When, Then
Checking that nothing is missing Findings that point at gaps, such as a slice with no specification
Systems reacting to each other Automations and translations

A model is more than one step. This is the Storefront’s checkout, where the shopper confirms the order and the rest of the shop reacts:

The shopper places the order and the shop records that checkout completed. The basket then empties by itself, and the shop announces to the rest of the company that an order was placed. Nobody pressed a button for those last two steps.

This section explains the ideas. The how-to pages show where to click.

For the method itself, its history and the thinking behind it, read the event modeling guide on cratis.io.

New terms are explained in the glossary.