Event Storming: Elements, Preparing and Running the Workshop
"EventStorming is a workshop format for quickly exploring complex business domains." — Alberto Brandolini, "Introducing Event Storming" (Ziobrando's Lair, 18 November 2013)
Summary: Event Storming is a workshop where experts and developers stick orange past-tense events on a long paper roll, then add commands, actors, policies, read models, external systems and aggregates until the whole flow is visible; it comes in three flavours (Big Picture, Process Modelling, Software Design) and turns a wall into bounded-context candidates, aggregates, use cases and an event catalogue in code. Focus: What it is and why it works, the three flavours and when to use each, the full colour legend and its grammar, preparing the room, the people and the facilitator, running a Big Picture step by step, facilitation techniques, process and design levels, outputs and next steps, stickies to Go packages and Laravel modules, remote sessions, common failures, and a complete run for the ordering business. Learning goal: Plan and run a Big Picture session for your own domain, read and write the legend without a cheat sheet, turn the wall into a context list, aggregates, handlers, policies and read models, and generate an event catalogue from a JSON list of stickies with a tested Go tool or a Laravel Artisan command.
This chapter belongs to group DD 02 (Tactical Design), yet it is the bridge between the strategic and the tactical chapters. It assumes you know what a domain and its subdomains are (Domains & Subdomains) and why one shared vocabulary matters (Ubiquitous Language). It discovers contexts and aggregates; it does not define them. The neighbours own the definitions: where a model's lines go (Bounded Context), how two contexts meet (Context Maps & Integration Patterns), what an aggregate protects (Aggregates & Factories), the difference between an in-process fact and a published one (Domain Events vs Integration Events), and what the read side costs (Data Patterns). One running example is used throughout: an online ordering and fulfilment business with the contexts Sales, Fulfilment, Billing, Catalog and Identity.
Page map
| If you are looking for | Go to |
|---|---|
| The whole page in four tables | Everything in one minute |
| Why a sticky wall beats a diagram | Why it exists |
| Brandolini, DDD-crew, Vernon, Khononov | Where it comes from |
| What it is, why orange stickies work | What it is |
| Big Picture vs Process Modelling vs Software Design | The three flavours |
| Colours and what each sticky means | The legend |
| Domain event, command, policy, aggregate, read model, hot spot | Element blocks |
| Pivotal events, swimlanes, emerging contexts | Boundaries from the wall |
| Who to invite, room, paper roll, stickies, remote tools | Preparing the workshop |
| The facilitator's job and what not to do | Preparing the facilitator |
| Phase by phase agenda | Running a Big Picture |
| Phone a friend, parking lot, reverse narrative | Facilitation techniques |
| Process level and design level sessions | Process and design levels |
| What you hand over when it ends | Outputs and next steps |
| Stickies to packages, handlers, listeners | From stickies to code |
| Miro, Mural, timeboxes, small groups | Remote Event Storming |
| A full run for the ordering business | Running example |
| Go and Laravel for one slice, plus the catalogue tool | Go, Laravel |
| What goes wrong | Common failures |
| Monolith to distributed | In architecture |
| Hands-on | Lab |
| Wrong beliefs, quiz, terms | Misconceptions, Cheat sheet, Self-check, Glossary |
Everything in one minute
The three flavours. Each row is unpacked in The three flavours.
| Flavour | Question it answers | Who is in the room | Typical output | Time |
|---|---|---|---|---|
| Big Picture | What happens in the whole business and where does it hurt? | 10 to 30+ people from every department | Timeline, pivotal events, hot spots, emerging bounded contexts | A day (about 3 to 6 hours of modelling) |
| Process Modelling | How does one process really run, and what is wrong with it? | 5 to 10 people who run that process | Commands, policies, read models, actors, external systems, bottlenecks | Half a day |
| Software Design | What should the code of one context look like? | Developers plus 2 to 3 domain experts | Aggregates, invariants, event design, a base for use cases | Half a day to two days |
The legend. Colours follow the DDD-crew glossary (which cites Brandolini); the original 2013 article used purple for external triggers. See The legend.
| Sticky | Colour (typical) | Sentence it makes | Maps to in code |
|---|---|---|---|
| Domain event | Orange | "Order Placed" (past tense) | Domain event class, event name on the wire |
| Command / action | Blue | "Place Order" (imperative) | Use case, handler, API endpoint |
| Actor | Small yellow | "Customer", "Picker" | Role, permission, caller |
| Aggregate (constraint) | Large pale yellow | "Order" | Aggregate root, transaction boundary |
| Policy | Lilac | "Whenever Order Placed then Request Payment" | Event listener, process manager, saga step |
| Read model | Green | "Order Status" | Query, projection, screen data |
| External system | Wide pink | "Payment Provider" | Port and adapter, ACL |
| Hot spot | Neon pink, tilted | "Payment after cancel?" | Backlog of questions, risk list |
| Opportunity | Green, small | "Live tracking" | Idea backlog |
The grammar. Details in The grammar of the wall.
| Pattern | Reads as |
|---|---|
| Actor, command, aggregate, event | "A customer places an order; the Order accepts it and Order Placed happens" |
| Event, policy, command | "Whenever Order Placed, then request payment" |
| Read model, actor, command | "The picker looks at the pick list, then packs the parcel" |
| Event, external system | "Payment Captured arrives from the payment provider" |
From wall to code. Details in Outputs and next steps and From stickies to code.
| Wall output | Becomes |
|---|---|
| Clusters between pivotal events, language changes | Bounded context candidates, then the Bounded Context Canvas |
| Large yellow sticky with its commands and events | Aggregate candidate with invariants (Aggregates) |
| Orange events | Domain events and integration events (events chapter) |
| Blue commands | Use cases (application services) |
| Lilac policies | Listeners, process managers, sagas |
| Green read models | Queries and projections (CQRS) |
| Hot spots | Questions with an owner and a date |
Why it exists
Software is built from knowledge that sits in many heads, and each head holds a different part. The developer knows how the system works but not why the business does it. The warehouse supervisor knows why, but not what the code does. Finance sees a third picture. Classic ways of bringing them together (requirements documents, UML, meetings with a projector) have a hidden problem: they are slow, expensive to change, and only one person talks at a time.
Event Storming flips the setup. Everyone stands. The model is a wall of cheap sticky notes. Anyone can add, move or throw away a note in seconds. Because a note is just a past-tense verb ("Parcel Packed"), a warehouse supervisor can read it and say "that is not what happens, it is Parcel Picked first".
| Meeting with slides or UML | Event Storming | What changes |
|---|---|---|
| One person speaks, the rest listen | Everyone writes at the same time | Ten hours of knowledge in one hour |
| Model drawn by the one who knows the notation | Notation is one sentence ("a thing that happened") | Experts can contribute from minute one |
| Disagreement is hidden in polite silence | Disagreement becomes a visible hot spot sticky | Conflicts are surfaced early, when cheap |
| Model starts from a data model | Model starts from behaviour | No table drives the design |
| Result is a document | Result is a wall plus a list of next steps | Learning is the product |
An everyday picture. Imagine a city map being drawn by every resident at once on a shared floor roll. The baker marks the bakery, the driver marks the one-way streets, the mayor marks the town hall. Nobody has the whole map, but in two hours the map appears, and the spots where two residents drew different things (a street that exists for one, not for the other) are exactly the spots the city planner needs to look at. The wall is that floor roll, the stickies are the marks, the red tilted notes are the "you two disagree" flags.
Three common misunderstandings, up front
| Belief | Reality |
|---|---|
| "Event Storming is a way to draw UML with stickies" | It is an exploration, not a notation. Precise notation early kills the conversation |
| "It is for developers to design the system" | The point is that people with questions and people with answers share a wall; developers listen and ask, they do not model |
| "We did the Big Picture, so we are done" | The Big Picture finds the interesting places. Process and design level sessions, and code, come after |
Where it comes from
| Year | Who | What |
|---|---|---|
| 2003 | Eric Evans | Domain-Driven Design gives the vocabulary of aggregates, bounded contexts and the ubiquitous language that Event Storming later makes visible |
| 2012 | Alberto Brandolini | "Event-based modelling workshop" at Italian Agile Day, born from "I have no time to draw a precise UML diagram, let's do this instead" |
| 2013 | Brandolini | Names it EventStorming and publishes the seminal article (orange events, blue commands, purple external triggers, aggregates as the part that decides) |
| 2013 | Vaughn Vernon | The IDDD workshop tour in Belgium and Poland is where Brandolini gathered early feedback; Vernon later covers it in Domain-Driven Design Distilled |
| 2013 onward | Practitioners | Mathias Verraes, Tom Janssen, Marco Heimeshoff, Yves Reynhout and others extend the format |
| 2015 onward | Brandolini | Introducing EventStorming on Leanpub: Big Picture, Process Modelling, Software Design as separate recipes |
| 2019 onward | DDD-crew (Kenny Baas-Schwegler, Chris Richardson) | Open glossary and facilitator cheat sheet, CC BY 4.0 |
| 2021 | Vlad Khononov | Learning Domain-Driven Design presents Event Storming as one way to discover the domain (background reading, not fetched) |
| 2020 onward | Brandolini and the community | Remote Event Storming (Miro, Mural) forced by the pandemic; the author says online is not a good fit for Big Picture |
Sources actually read for this chapter: Brandolini's 2013 article, eventstorming.com (home, book, patterns, resources pages), the DDD-crew glossary and cheat sheet, the Leanpub book page (table of contents and description), the Miro template page and Laravel 13 docs. Vernon (Distilled) and Khononov (Learning DDD) are books we did not fetch; they appear as background and no sentence in this chapter is quoted from them. The numbers for session length are our guidance, not Brandolini's.
Divergence worth knowing. The 2013 article used purple for "external system or time" and pale yellow for the aggregate. The DDD-crew glossary (current) uses wide pink for external systems, neon pink and tilted for hot spots, and says the aggregate is a "legacy word in EventStorming" for business audiences; the large pale yellow sticky is called a constraint there. We use "aggregate" because this is a DDD course.
What it is
Event Storming as a workshop Must-know
In plain words: A group of people who know different parts of a business write what happens, as past-tense events on orange stickies, onto a very long paper roll, in time order, then argue, correct and enrich it until everyone sees the same story.
Common misunderstanding: "It is a brainstorm." A brainstorm collects ideas and stops. Event Storming enforces a timeline, so every sticky must fit next to its neighbours, and a note that does not fit is a question.
Definition: a collaborative modelling workshop, invented by Brandolini, in which domain events are placed on an unlimited modelling surface, then enriched step by step with other element types, with the explicit goals of shared understanding, discovered conflicts, and, at the design level, aggregate and context boundaries.
Why it works, in four moves
1 Explore before modelling -> a wall of facts, no solution yet
2 Everybody at once -> experts and developers write in parallel
3 Enforce the timeline -> contradictions have nowhere to hide
4 Mark what hurts -> hot spots become the agendaReal scenarios: a new business unit explains its flow to engineers in a day; a startup tests a business model; a legacy order system is being split and nobody remembers all rules; a new hire needs to understand "what the company does".
| What makes it work | Why |
|---|---|
| Orange stickies of one kind | Only one question: what happened? Anyone can answer |
| Whole system in one room | The silos that cause problems meet physically |
| Experts and developers together | Questions and answers are in the same place, in the same hour |
| Explore before modelling | You discover what you did not know to ask |
| Unlimited surface | The problem is bigger than any whiteboard |
| No chairs | People move, read, talk, and cannot hide behind a laptop |
How to use it: start with the question "what is the goal of this session?" (assess a line of business, explore a startup model, design a service, design software), then pick the flavour in The three flavours.
The concept catalogue
The three flavours Must-know
In plain words: The same wall, three zoom levels. Big Picture looks at the whole business from far away; Process Modelling looks at one process from close; Software Design looks at the code of one context from very close.
Common misunderstanding: "Event Storming is one workshop with one set of colours." Brandolini himself says there is no single format: the 2013 article's disclaimer states that "the format described in this page is no longer my favorite one" and that he "perfectioned a few different recipes".
Definition: Big Picture, Process Modelling and Software Design (also called Design Level) are three recipes that share the first steps (events on a timeline) and differ in participants, scope and the elements added next.
Zoom levels (same colours, growing rules)
Big Picture orange events, actors, systems, hot spots, opportunities
10 to 30+ people, whole line of business
|
v pick a hot spot
Process Modelling + commands, policies, read models, value
5 to 10 people, one process
|
v pick one bounded context
Software Design + aggregates (constraints), event design, UI sketches
developers + experts, one context| Aspect | Big Picture | Process Modelling | Software Design |
|---|---|---|---|
| Goal (DDD-crew) | Assess the health of a line of business or the viability of a new model; shared state of mind | Assess the health of a current process; find bottlenecks; find what to decouple | Clean, maintainable event-driven software; shared language in a shared model |
| Participants | 10 to 30+ on one paper roll | The people who run the process | Developers and the experts of one context |
| Elements | Events, actors, systems, hot spots, opportunities, value | + commands, policies, read models | + aggregates (constraints), invariants, event design |
| Starts with | Chaotic exploration | A chosen hot spot or a chosen process | One chosen bounded context candidate from the Big Picture |
| Ends with | Pivotal events, emerging contexts, a pick of problems | A redesigned or understood process, a list of changes | Aggregates, handlers, event contracts, first code |
| Remote friendly | Poorly (Brandolini: "online delivery isn't a good fit for Big Picture") | Yes, with Miro templates | Yes |
| Typical mistake | Starting with the solution | Drawing it like BPMN | Starting before the Big Picture shows where to look |
| You want to... | Use | Why |
|---|---|---|
| Understand an unfamiliar business | Big Picture | Shared story, hot spots, boundaries |
| Fix one slow or buggy process | Process Modelling | Policies and read models expose waiting and missing information |
| Design one service or module | Software Design | Aggregates, commands and events map to code |
| Onboard new hires | Big Picture (smaller) | Brandolini mentions "induction for new hires" as a variation |
| Plan a split of a monolith | Big Picture, then Software Design | Boundaries first, aggregates second |
| Test a startup idea | Big Picture | Multiple business models can be explored |
Real scenarios: the ordering business runs a Big Picture across Sales, Warehouse, Finance and Support; the hot spot "payment after cancel" gets a Process Modelling session; the Fulfilment team then runs a Software Design session for Pick List.
Fix / how to use it: run them in that order, one per question, and write the outputs of each as the input of the next (Outputs and next steps).
The legend Must-know
| Element | Meaning | Written as | Colour (DDD-crew glossary) | Used in |
|---|---|---|---|---|
| Domain event | Something that happened, relevant to the domain experts | Past tense: "Order Placed" | Orange | All flavours |
| Command (action) | A decision, intent or action; from an actor or an automated process | Imperative: "Place Order" | Blue | Process, Design |
| Actor (agent) | A person, team, department or role around events or commands | Noun: "Customer" | Small yellow | All flavours |
| Aggregate / constraint | The part of the system that receives commands and decides, enforcing business rules | Noun: "Order" | Large pale yellow | Design |
| Policy | A reaction: "whenever X happens, we do Y" (manual or automated); also reactor, rule, "lie detector" | "Whenever Order Placed then Request Payment" | Large lilac | Process, Design |
| Read model (query model, information) | What a person needs to see to decide | "Pick List View" | Green | Process, Design |
| External system | A deployable IT system around the domain: Excel, a SaaS, a microservice | "Payment Provider" | Wide pink | Big Picture and up |
| Hot spot | Conflicts, questions, objections, frictions, procrastinated detail | A question | Neon pink, tilted | All flavours |
| Opportunity | Positive counterpart of a hot spot | "Show live tracking" | Green (small) | Big Picture |
| Value | Where value is made or lost, as in a value stream map | + / - | Red and green small | Big Picture |
| UI / read model sketch | A screen, table or graph that matters to a user | Sketch on a sticky | Placed near the command | Process, Design |
| Pivotal event | One of the few events that most people care about | An orange event with a mark | Orange (marked) | Big Picture |
| Swimlane | Horizontal strip assigned to an actor or department | A line of tape | none | Big Picture |
Colour is a convention, not a law. Brandolini's own book lists "Precise Notation" among the anti-patterns and "Incremental Notation" and "Fuzzy Definitions" among the patterns (eventstorming.com/patterns: "Precision is a legitimate aspiration. But too much precision, too early, can get in a way of a good exploratory conversation."). Introduce elements one at a time, when the conversation needs them; do not hand a 10-colour legend to people who have never seen a sticky wall.
The grammar of the wall Must-know
In plain words: The stickies make sentences. If a sentence on the wall does not read, something is missing or wrong.
Common misunderstanding: "Every event needs a command in front of it." Early on, events stand alone. Some events are consequences of the passing of time or of an external system, and some are produced by a policy reacting to another event.
Definition: the rule of the wall: an actor issues a command on an aggregate; the aggregate decides and, if the rules hold, emits one or more events; a policy reacts to an event and issues the next command; a read model gives an actor the information needed to decide.
actor ──► command ──► aggregate ──► event ──► policy ──► command ──► ...
▲ │
read model ◄──────── (events feed it) ───┘
external system can sit before a command (it triggers) or after an event (it is told)| Sentence | Reads as | A test of the sentence |
|---|---|---|
| Customer, Place Order, Order, Order Placed | "The customer places an order; the order accepts it" | Can I name who decides? If not, the aggregate is missing |
| Order Placed, policy, Request Payment | "Whenever an order is placed, ask for payment" | Is the policy automatic or manual? Write it on the sticky |
| Payment Captured, policy, Release For Picking | "When money is in, release the order" | What if the payment arrives after a cancel? Hot spot |
| Pick List View, Picker, Pack Parcel | "With the list in hand, the picker packs" | What exactly must be on the list? Read model |
| Carrier API, Parcel Handed To Carrier | "The carrier is told" | Do we wait for their reply? Maybe another event |
Real scenario: in a session for the ordering business, a stickies chain "Order Placed, Payment Captured" has no policy between them; the finance expert says "someone clicks 'send payment link' by hand, daily, at nine". That hand-made step is a manual policy, and it is the reason orders wait for a day.
What provides it: the facilitator, who asks "what makes this happen?" for every orphan event. In code the same rule is the type system of the wall tool: a command without aggregate or without emitted event is rejected.
Domain event Must-know
In plain words: A fact the business cares about, stated in the past tense, such as "Order Placed" or "Parcel Handed To Carrier".
Common misunderstanding: "An event is a database change." "Order Updated" is a data change; "Order Cancelled By Customer" is a business fact. If an expert cannot read the sticky and nod, it is not a domain event. See Domain Events vs Integration Events.
Definition (DDD-crew): "an event that is relevant for the domain experts and contextual for the domain that is being explored. A Domain Event is a verb at the past tense. The official EventStorming colour is orange."
Writing events, 3 minutes alone (chaotic exploration)
1 Warehouse supervisor writes Parcel Packed
2 Support lead writes Refund Issued
3 Developer writes Order Row Inserted <- smell: implementation
4 Finance writes Payment Captured
5 Facilitator rephrases 3 -> "Order Placed"? ask the expertReal scenarios: "Product Listed", "Order Placed", "Payment Captured", "Order Released For Picking", "Parcel Packed", "Parcel Handed To Carrier", "Order Delivered", "Refund Issued".
| Smell | Example | Fix |
|---|---|---|
| Implementation word | "Row Inserted" | Ask what the business saw happen |
| Imperative | "Place Order" | That is a command; move it, blue |
| Vague | "Order Updated" | Which fact? Cancelled, changed, paid? |
| Too big | "Order Fulfilled" | Split: released, picked, packed, handed over |
| Passive without actor-in-mind | "Data Saved" | Name the business moment |
Fix / how to use it: keep one event per sticky, max five words, in the language of the experts (Ubiquitous Language). Code names: OrderPlaced in Go and in PHP (see Go and Laravel).
Command Must-know
In plain words: What somebody (or something) wants to happen, written as an order: "Place Order". The command may be refused; the event after it says what actually happened.
Common misunderstanding: "A command is an HTTP request or a CRUD verb." A command is a business intention with a name from the language: "Cancel Order", not "PUT /orders/1". An HTTP endpoint may carry it, a queue may carry it, a timer may issue it.
Definition: an imperative sticky, issued by an actor or by a policy, handled by an aggregate. DDD-crew: "Represents decisions, actions or intent... During process EventStorming, the word 'Action' usually fits better with stakeholders than command".
Command lifecycle on the wall
1 Customer (actor) issues Place Order (blue)
2 Order (aggregate) checks at least one line (invariant)
3 Order emits Order Placed (orange)
4 Refused? -> no event, an error reaches the actor| Source of a command | Example | How it looks in code |
|---|---|---|
| Actor | Customer, Support agent | HTTP handler, CLI, UI action |
| Policy | Whenever Order Placed then Request Payment | Listener or subscriber |
| Time | Every night close the day | Scheduler (Laravel schedule, Go time.Ticker) |
| External system | Carrier says delivered | Webhook consumer |
Real scenario: "Cancel Order" is issued by the customer, by support, and by a policy "Whenever Payment Failed three times then Cancel Order". Three issuers, one command, one place for the rule.
Fix / how to use it: one handler per command (application services); the handler loads the aggregate, calls it, saves, and publishes.
Actor Good to know
In plain words: The person or group around an event or command. Not users in the abstract: real roles ("picker", "support agent").
Common misunderstanding: "Actors are system accounts." The actor is the human role (or team) whose work the model captures. Systems have their own sticky.
Definition: a small yellow sticky next to commands or events; DDD-crew: "a group of people, a department, a team or a specific person". Early sessions used yellow stickies as personas ("Sketching User Personas" in Brandolini's 2013 article).
| Actor | Where the actor appears in code |
|---|---|
| Customer | Identity context, authenticated principal |
| Picker | Fulfilment role, permission to Pack Parcel |
| Support agent | A role allowed to Cancel Order for others |
Fix / how to use it: an actor without a command is a smell (what do they do?). An actor with many commands is a role to split.
Aggregate (constraint) Must-know
In plain words: The thing that says yes or no to a command and keeps its own rules true.
Common misunderstanding: "An aggregate is an entity with a table." On the wall it is found outside-in, from commands and events, not from a data model. Brandolini 2013: "the Aggregate is the portion of the system that receives commands and decides whether to execute them or not, thus producing a domain event."
Definition: a large pale yellow sticky grouping commands that need the same invariant to be true together; it becomes the consistency and transaction boundary in code (Aggregates & Factories). DDD-crew calls the sticky constraint with business audiences.
Finding the aggregate (design level)
Place Order ─┐
Cancel Order ─┼──► [ Order ] invariant: "cannot cancel after dispatch"
Change Address┘ │
└──► Order Placed, Order Cancelled
Request Payment ──► [ Invoice ] invariant: "settled at most once" (other aggregate)| Question that finds the boundary | If yes | If no |
|---|---|---|
| Do these two commands break the same rule together? | Same aggregate | Separate aggregates |
| Must both changes be consistent in one transaction? | Same aggregate | Eventual consistency via a policy |
| Do different people own them? | Probably different contexts | Same context |
Fix / how to use it: write the invariant on the sticky ("An order has at least one line"). If you cannot write one, it is a table; do not make it an aggregate. The Go snippet's Order and the PHP Order keep exactly the two invariants from the wall.
Policy Must-know
In plain words: "Whenever this happens, then we do that." The glue between an event and the next command.
Common misunderstanding: "A policy is the same as a business rule inside the aggregate." The aggregate decides; the policy only reacts. "Whenever Payment Captured then Release Order For Picking" is a policy; "an invoice is settled at most once" is an invariant.
Definition (DDD-crew): "a reaction that says 'whenever X happens, we do Y', eventually ending up in the flow between a Domain Event and a Command/action... A policy can be an automated process or manual."
Hidden manual policy exposed by the wall
1 Order Placed
2 (nobody) <- orange sticky and blue sticky, no lilac between
3 Request Payment <- "someone clicks send-payment-link at 9:00"
Fix: add lilac "Whenever Order Placed then Request Payment" and ask: manual or automatic?| Policy flavour | Example | Code |
|---|---|---|
| Automatic | Whenever Order Placed then Request Payment | Event listener / queue consumer |
| Manual | Whenever a refund is over 500, then the manager approves | Task in a UI; a read model for the manager |
| Time-based | Whenever 30 min passed without payment then Cancel Order | Scheduled job, delayed message (retry and delay) |
| Multi-step | Whenever Payment Failed then retry, whenever 3 fails then Cancel | Process manager or saga |
Real scenario: the "lie detector" nature DDD-crew mentions: when you ask "what happens if the payment fails?", the policy sticky turns into three more stickies and a hot spot.
Fix / how to use it: one listener per policy, named like the sticky; idempotent, because delivery is at least once (Idempotent Consumer).
Read model Important
In plain words: The information somebody needs on the screen before they can decide. The green sticky answers "what do they need to see?".
Common misunderstanding: "A read model is a table of the aggregate." It is whatever the actor needs: often built from events of several aggregates, sometimes from several contexts.
Definition: a green sticky (DDD-crew: "Query Model/Information") placed before a command; in code a query, projection or view (event sourcing and CQRS).
Picker decides Read model Command
1 Picker needs -> Pick List View: SKU, bin, qty -> Pack Parcel
2 Customer needs -> Order Status: placed/paid/dispatched (no command, just reading)| Question | Answer |
|---|---|
| Which events feed it? | Order Released For Picking, item stock changes |
| How fresh must it be? | A pick list: seconds. An executive dashboard: hours |
| Who owns it? | The context of the user who reads it |
Real scenario: the support agent cannot decide on a refund because the "order, payment and parcel" are in three places; the wall shows one green sticky "Order Overview" with three arrows into it. That is the cheapest feature of the quarter.
Fix / how to use it: a projection fed by events, idempotent, rebuildable (see the SQL block in Go); keep it out of the aggregate.
External system Good to know
In plain words: Any IT system outside the model: payment provider, carrier API, an Excel file.
Common misunderstanding: "Only third-party APIs are external systems." DDD-crew: "anything from using Excel to some microservice". If you cannot change its model, it is external for you.
Definition: a wide pink sticky mapped around events or commands; a seam for an anticorruption layer (Context Maps & Integration Patterns).
Real scenario: "Payment Provider" appears next to Request Payment and Payment Captured; "Carrier API" next to Parcel Handed To Carrier.
Hot spot and opportunity Must-know
In plain words: A tilted pink note that says "we do not agree, or we do not know". An opportunity is the same idea in the positive.
Common misunderstanding: "A hot spot is a bug." It is a question or a conflict, and it is the best output of the day. DDD-crew: hotspots capture "inconsistencies (in language), frictions, questions, dissent, objections, issues or procrastinating going deep to explore for later".
Definition: a neon-pink note (slightly tilted) placed where the conflict is; opportunities are green and come after the timeline is consistent.
Hot spot flow
1 Finance: "payments arrive within a minute"
2 Support: "I have orders paid after 3 days"
3 Facilitator writes a hot spot: "Payment latency: 1 min or 3 days?" (no debate now)
4 Later: pick it, assign an owner, bring data| Do | Do not |
|---|---|
| Write the question, stick it where it hurts | Solve it in the room, unless it is the picked problem |
| Count them: a wall without hot spots is a polite wall | Hide disagreement to keep the mood |
| Add opportunities after the timeline is consistent | Invent solutions in the first hour |
Fix / how to use it: every hot spot leaves the workshop with an owner and a date (Outputs).
Boundaries from the wall: pivotal events and swimlanes Must-know
In plain words: A few events matter to many people ("Order Placed", "Payment Captured"); they are the pillars of the story, and the stretches between them are candidate territories.
Common misunderstanding: "Swimlanes per department are the contexts." Swimlanes are a readable tool (DDD-crew: "tempting... the most obvious choice for people with a background in process modelling"), but contexts emerge from language changes and pivotal events, not from the org chart. See Bounded Context.
Definition: a pivotal event is "one of the few most significant events in the flow... often the events with the highest number of people interested" (DDD-crew, citing Brandolini's Discovering Bounded Contexts with EventStorming). An emerging bounded context is a region between pivotal events where the vocabulary and the people are consistent.
Finding boundaries on the timeline
Product Listed | Cart Checked Out | **Order Placed** | **Payment Captured** | Released | Packed | **Handed To Carrier** | Delivered
<----------- Sales / Catalog ---------><-- Billing --><-------------------- Fulfilment -------------------->
signals: "Order" means a cart for sellers, a pick list for pickers, an invoice basis for finance| Signal | What it suggests | Check |
|---|---|---|
| Pivotal event | A seam between territories | Do different people work before and after? |
| Same word, different meaning | Two languages, two contexts | Ask both experts to define it |
| A hot spot cluster | A boundary under strain | Who owns the rule? |
| Different tempo | Real-time vs batch | Different tech and teams |
| Different systems | Legacy island | Anticorruption layer |
| Different owner | Team boundary (Conway) | Does a manager differ? |
Fix / how to use it: draw dashed regions on the wall in a second colour of tape only after the discussion; do not draw first.
Mechanics
Preparing the workshop Must-know
In plain words: Most of the success is decided before the first sticky: the right people, a long wall, plenty of stickies, no chairs, a clear invitation.
Common misunderstanding: "We can run it in the usual meeting room with a whiteboard and 10 laptops." A whiteboard is too small and a laptop is a place to hide. Brandolini's blog lists the needs as "a suitable room... a writable surface... a LOT of sticky notes... working markers... masking tape... the right people... a facilitator".
Definition: the pre-workshop work: choosing the goal, the flavour, the people, the room, the materials, the invitation, the agenda and the facilitator's own preparation.
Two weeks to one hour before
T-14d Goal agreed with sponsor (assess, explore, design?)
T-10d Invite list: experts of every department + developers + facilitator(s)
T-7d Invitation sent with goal, date, video link, "no slides, bring questions"
T-2d Room booked, 8 m wall cleared, paper roll and stickies bought
T-1d Facilitator walks the room, hangs the legend, tests markers
T-0 Facilitator arrives first, leaves last| Item | Choice | Why |
|---|---|---|
| Who | Everyone who brings knowledge and everyone who needs the knowledge: domain experts of several departments (sales, warehouse, finance, support), product, developers, testers, ops | DDD-crew: "usually domain experts and the engineers" |
| How many | Process and Design: 5 to 10. Big Picture: 10 to 30+ | The 2013 article suggested "6..8"; the later glossary says "10-30+ people on one paper roll" |
| Facilitators | 1 per ~15 people, ideally two for a big group | One watches energy, one watches content |
| Room | A quiet room with a long free wall; windows that open | DDD-crew: "no seats in sight... a modelling surface around 6-8 meters" |
| Surface | A paper roll (Brandolini: an Ikea paper roll, "Måla") taped to the wall | "Your problem is bigger than your whiteboard" |
| Stickies | Orange (events) in bulk; blue, lilac, green, pink, yellow in smaller packs; pale yellow large | Sticky colours of the legend |
| Markers | One per person plus spares (Brandolini's pattern "One person/One Marker") | Everyone can write at the same moment |
| Tape | Masking tape for lanes and region borders | Structure only when needed |
| Legend | A visible legend on the wall (pattern "Visible Legend") | New elements are taught one at a time |
| Time | Big Picture: one day, about 3 hours of modelling plus breaks | Our guidance; Brandolini's 2013 article says "in hours instead of weeks" |
| Food | Fresh air, snacks, water | Energy |
The invitation. It carries: the goal (one sentence), the date and place, the promise ("you will see the whole flow in one wall"), the ask ("bring a question you want answered and knowledge nobody else has"), a short video (DDD-crew facilitator: Brandolini's "50,000 Orange Stickies Later"), and the rule "no slides, no laptops". A sample text:
Subject: Ordering: one wall for the whole flow, Thursday 10:00-16:00, room 4.12
Goal: See the flow from "Product Listed" to "Order Delivered" and mark what hurts.
Who: Sales, Warehouse, Finance, Support, Product, Dev. We need your knowledge.
Bring: One question you want answered; expect to stand and write.
Watch: "50,000 Orange Stickies Later" (50 min), optional.A day's agenda (our starting point; the phases are from Brandolini's table of contents):
| Time | Phase | Output |
|---|---|---|
| 10:00 | Check-in and kick-off | Everyone has spoken once; the legend is explained |
| 10:20 | Chaotic exploration | Hundreds of orange stickies, unordered |
| 11:00 | Enforce the timeline | One left-to-right story, duplicates removed |
| 12:00 | Lunch | The wall stays |
| 13:00 | People and systems | Actors and external systems added |
| 13:30 | Problems and opportunities | Hot spots and opportunities |
| 14:15 | Pick the problem | One or two hot spots chosen for the next step |
| 15:00 | Reverse narrative (optional) | Gaps found by reading backwards |
| 15:30 | Check-out | What did we learn? Next steps with names |
Real scenarios: a day for the ordering business with 18 people from Sales, Warehouse, Finance, Support and Dev; a remote 2-hour session for a team of 6 with a pre-built Miro board.
Preparing the facilitator Must-know
In plain words: The facilitator is not the expert and not the boss of the model. Their job is to keep the wall honest and the room alive.
Common misunderstanding: "The facilitator should model it to speed things up." The moment a facilitator (or a developer) puts the model on the wall for the group, the group stops thinking. Brandolini's anti-patterns list includes "Dungeon Master", "Human Bottleneck", "The Spoiler" and "The godfather".
Definition (DDD-crew): "a neutral role so that you can cut long discussions short and visualise them with hotspots... always the first in the room and the last to leave... give them feedback and insights about the group interaction".
A facilitator's loop during the day
1 Observe who is silent, who dominates, who looks at the phone
2 Name it "I see part of the group on their phones" (feedback, not blame)
3 Intervene only when the group cannot decide; otherwise let it run
4 Capture write a hot spot instead of arguing
5 Reset change the activity when energy drops| Do | Do not |
|---|---|
| Ask questions ("what happens before this?") | Answer them ("it is the Order Service") |
| Write hot spots yourself, fast | Resolve conflicts that are not the picked problem |
| Keep your hands off the stickies, except hot spots | Place stickies for the group |
| Manage energy (breaks, movement, noise) | Run a long monologue |
| Check in at the start and check out at the end | Skip the human part |
| Prepare the legend and the first 3 stickies | Hand out a 10-colour legend at once |
What you rehearse: a one-minute explanation of what a domain event is; the check-in questions ("how are you, what do you hope to get out of today?"); the three Deep Democracy agreements the DDD-crew cheat sheet uses ("Everyone is right; nobody has the monopoly on the truth. We start a conversation to deepen our relationship. We are willing to learn together."); a plan for the first 20 minutes.
Real scenario: the sponsor, a director, starts to explain how things "really" work and the room goes silent. The facilitator hands the director a marker: "Please write the events you see. Everyone writes first."
Running a Big Picture step by step Must-know
In plain words: Write alone, then together, then add people and systems, then mark pain, then pick what to fix.
Common misunderstanding: "Order the events first, then fill in the rest." First everybody writes without ordering, alone, because early ordering and early talking bias the room.
Definition: the phases of Brandolini's Big Picture (table of contents of Introducing EventStorming): Kick-off, Chaotic Exploration, Enforcing the timeline, People and Systems, Problems and opportunities, Pick your problem; plus the reverse narrative as a quality check.
Big Picture, minute by minute (typical)
0 Check-in one sentence each, no work talk
10 Legend one sticky: "Order Placed" on the wall as example
20 Chaotic "Write the events you know. On your own. Stick them anywhere in time order."
50 Enforce timeline "Talk now. Remove duplicates. Order left to right. Tape sparingly."
110 Walk-through "Tell the story aloud, from start to end, as one person"
140 People, systems small yellow (people), wide pink (systems)
170 Problems/opps hot spots (pink) and opportunities (green)
200 Pick the problem "Which hot spot is worth the next hour?"
230 Check-out circle, one sentence each, next steps| Phase | Facilitator says | What the group does | Output | Typical trap |
|---|---|---|---|---|
| Kick-off | "We explore, we do not solve; everybody writes" | Check-in, agreements, legend | Shared rules | Too much explanation |
| Chaotic exploration | "Write events, alone, quietly; read others but do not discuss" | Each person writes stickies in past tense and places them in rough order | 100s of events | Starting to discuss; developers writing implementation events |
| Enforce the timeline | "Now talk. Remove duplicates; order left to right" | Discuss, merge, move; the noise is good | One consistent flow with a few parallel lanes | Tape too early; losing insight |
| Walk-through (explicit narrative) | "Someone narrate from the start" | Read the story aloud, fix gaps | A story that works | Skipping it: the wall looks complete but no one has told it |
| People and systems | "Who is involved? What systems?" | Add actors and external systems | Actors, systems around events | Treating systems as the model |
| Problems and opportunities | "Where does it hurt? What could be better?" | Hot spots first, opportunities after | A map of pain and hope | Solving in the room |
| Pick the problem | "We cannot fix all. Vote or choose" | Pick one or two hot spots, by dots or by discussion | The next-session scope | Choosing the easiest, not the most valuable |
| Reverse narrative | "Tell it backwards from the last event" | Read from the end: "for this to happen, what must be true before?" | Missing events found | Skipping when tired |
| Check-out | "What did you learn? What next?" | Circle | Commitments | Ending without next steps |
Real scenario: in the ordering session, the reverse narrative starts at "Refund Issued": "before a refund, a return must be received; before that, a return label; before that, a delivery event" and the group realises there is no event for "Return Requested", so the support team has been working off an email inbox.
What the phases are not: the "Value" step (red and green stickies for where value is made or lost, as in a value stream map) is a bonus, used after the consistent timeline, when the topic is waste or pricing.
Facilitation techniques Must-know
In plain words: Small moves that keep a big group productive.
Common misunderstanding: "More structure early means better results." Brandolini's pattern "Incremental Notation" says to keep participants "in the zone by providing just enough guidance for the current need".
Definition: a toolbox of interventions. The names below that appear in Brandolini's published pattern list on eventstorming.com or in the Leanpub table of contents are marked (B); the others are common workshop practice we describe in our own words.
| Technique | What you do | When | Source |
|---|---|---|---|
| Chaotic exploration | Everyone writes events alone, unordered | Start of Big Picture | (B) |
| Enforce the timeline | Merge, order, discuss | After chaos | (B) |
| Pivotal events | Mark the few events that many care about; they define boundaries | When the timeline is stable | (B), DDD-crew |
| Swimlanes | Horizontal lanes per actor or department | When readability is poor; use after, not before | DDD-crew |
| Hot spots | Write a tilted pink note instead of arguing | Anytime there is a conflict or a question | (B), DDD-crew |
| Parking lot | A side area on the wall for off-topic items; hot spots serve the purpose | When a great but irrelevant topic arrives | Common practice |
| Phone a friend | If nobody present knows an answer, call the person who does, on the spot, or write a hot spot with their name | Missing expert | Common practice, our wording |
| Reverse narrative | Read the story backwards | Late, to find gaps | (B) |
| Speaking out loud | Narrate the flow aloud; reading silently makes everything look plausible | Process and design levels | (B) |
| One person, one marker | Everyone holds a marker | Always | (B) |
| Visible legend | Keep the legend on the wall | Always | (B) |
| Rush to the goal | Model the baseline solution first; collect objections and alternatives as hot spots | Design level | (B) |
| Raise the bar | Add corner cases to challenge the model | When the model feels too easy | (B) |
| Arrows only sparingly | Use arrows only when stickies cannot express time or causality | Always: stickies close together say "next" | Common practice, see "Precise Notation" anti-pattern |
| Check-in and check-out | A round of one sentence each | Start and end | DDD-crew |
| Leave stuff around | Keep the wall up afterwards for extra insights | After the workshop | (B) |
Phone a friend, in the room
1 Group is stuck: "who decides if we ship a partial order?"
2 Nobody in the room knows
3 Facilitator: write hot spot "Partial shipment rule?", add "Owner: Head of Warehouse"
4 Someone calls; or the item goes to the follow-up list with a date
5 The group moves on; the wall keeps the questionReal scenario: a developer says "obviously Payment Captured comes after Order Released". Finance says no, payment can be captured days later for invoice customers. The facilitator splits the timeline into two lanes (card and invoice customers) and places a hot spot "two paths, one policy?".
Fix / how to use it: pick two or three techniques per session and keep the rest in the back pocket. A good session feels loud and slightly messy.
Process and design levels Must-know
In plain words: After the big map, pick one place and zoom in. Add the blue and lilac stickies; at the design level add the aggregates and the invariants.
Common misunderstanding: "Process level is BPMN." It is a game with a grammar: events, commands, policies, read models, actors, external systems, hot spots, ordered left to right on a wall. Precision grows as you play.
Definition: Process Modelling and Software Design are the second and third flavours. DDD-crew: process modelling "helps the group create a shared state of mind of the current status quo of the process, find bottlenecks and identify parts of the system to decouple"; software design is "to design clean and maintainable Event-Driven software".
Process level: one slice, "place order -> ship" (timeline 1..9)
1 Customer issues Place Order -> Order Placed
2 policy whenever Order Placed then Request Payment [Payment Provider]
3 Request Payment -> Payment Captured
4 policy whenever Payment Captured then Release Order For Picking
5 Release -> Order Released For Picking
6 read model Pick List View shown to Picker
7 Picker issues Pack Parcel -> Parcel Packed
8 Picker issues Hand Parcel To Carrier [Carrier API] -> Parcel Handed To Carrier
9 read model Order Status shown to Customer| Step of a process-level session | Question | New sticky |
|---|---|---|
| Pick a hot spot or a process | What exactly are we looking at? | A frame on the roll |
| Rebuild the events | What happened, in order? | Orange events |
| Add commands | What triggered each event? | Blue |
| Add actors | Who? | Small yellow |
| Add policies | What reacts automatically or by hand? | Lilac |
| Add read models | What did the person need to see? | Green |
| Add systems | Which system is involved? | Wide pink |
| Add hot spots and value | Where is it slow, wrong, painful? | Pink tilted, red and green |
Design level adds the aggregate and its invariants, and slows down on the event design.
| Design-level step | Question | Output |
|---|---|---|
| Pick one context | Which context, from the Big Picture? | Scope |
| Rush to the goal | What is the baseline flow? | Happy path first |
| Discover aggregates | Which commands break the same rule? | Large yellow stickies with invariants |
| Raise the bar | What corner cases break it? | Hot spots, alternative paths |
| Name events precisely | What is the minimal fact? | Event payloads |
| Choose later | Which decisions can wait? | Parked as hot spots |
| Read models | What does each actor see? | Queries |
| Extract acceptance tests | Which examples tie-break an ambiguity? | Given-When-Then lines |
Real scenario: design-level session for Fulfilment: the Pick List aggregate has commands Release, Pack Parcel, Hand Over; invariant "never pick more than ordered"; the hot spot "ship partially?" is parked, with two alternative event paths drawn side by side.
Fix / how to use it: do not start a design-level session before the Big Picture shows where to dig; do not finish without a list of aggregates, commands and events per context.
Outputs and what to do next Must-know
In plain words: The wall is a means. At the end you need a short list: contexts, aggregates, events, commands, policies, read models and open questions, each with a next owner.
Common misunderstanding: "Take a photo and we are done." Brandolini's book has a chapter on the workshop aftermath with "Documenting the outcomes - TRICKY". A photo of 400 stickies is not documentation.
Definition: the translation of the wall into artifacts that other teams can use.
| Wall element | Output | Where it goes next |
|---|---|---|
| Clusters between pivotal events, language shifts | Bounded context candidates (names, one-line purposes) | Bounded Context Canvas, context map (Context Maps) |
| Large yellow stickies | Aggregate candidates with invariants | Aggregates, one aggregate per transaction |
| Orange events | Event list: name, context, trigger, payload sketch | Domain events inside, integration events outside (events chapter) |
| Blue commands | Command list with actor and aggregate | Use cases, API endpoints (application services) |
| Lilac policies | Policy list: trigger event, resulting command, manual or automatic | Listeners, process managers, sagas |
| Green read models | Query list with consumer and freshness | Queries, projections (CQRS) |
| Wide pink systems | Integration list | Ports and adapters, ACL |
| Hot spots | Question list: owner, due date, how we will answer | Follow-up sessions, spikes, decisions (ADR) |
| Opportunities | Idea backlog | Product backlog |
| Subdomain feelings ("this is where we compete") | Core, supporting, generic hints | Domains & Subdomains |
| Terms that changed meaning | Glossary seeds per context | Ubiquitous Language |
Aftermath, the first week
Day 0 Photo of every section; leave the wall up (pattern "Leave stuff around")
Day 1 Facilitator types the pivotal events, hot spots, and context candidates into a 1-page summary
Day 2 Sponsor and tech lead review: "is this a fair picture?"
Day 3 Owners assigned to hot spots; next sessions scheduled
Day 5 Bounded Context Canvas for the first context candidateWhat to do next: (1) Draw contexts, call them candidates; (2) run one process or design session per important candidate; (3) agree the first integration events; (4) write the first code slice (From stickies to code); (5) review the wall in a month, because the model will change.
From stickies to code Must-know
In plain words: Keep the names. The sticky "Order Placed" becomes OrderPlaced in Go and in PHP, the command "Place Order" becomes PlaceOrder, the policy becomes a listener with a name that reads like the sticky.
Common misunderstanding: "The workshop result is a diagram that developers then translate." If they translate, the language drifts. Brandolini's article: "You can also start coding almost immediately and validate the result of your exploration in code in a very short time."
Definition: a mapping from each sticky colour to a code artifact in a defined place.
| Sticky | Go | Laravel (modular monolith) |
|---|---|---|
| Domain event | sales.OrderPlaced struct in the context package | App\Modules\Sales\Domain\OrderPlaced readonly class |
| Event name on the wire (integration contract only) | catalogue.EventOrderPlaced = "sales.order.placed.v1" | sales.order.placed.v1 from php artisan es:catalogue, used by the outbox translator; OrderPlaced itself carries only its class name |
| Command | sales.PlaceOrder struct | PlaceOrder readonly class |
| Handler (use case) | PlaceOrderHandler.Handle | PlaceOrderHandler::__invoke |
| Aggregate | sales.Order with unexported state, Place constructor | Order::place() final class with private state |
| Policy | fulfilment.ReleaseWhenPaid.OnPaymentCaptured | Fulfilment\Policies\ReleaseOrderWhenPaid queued listener |
| Read model | sales.StatusProjection plus a table | OrderStatusProjector plus order_status_view table |
| External system | An interface (port) and an adapter package | A contract in Domain, an adapter in Infrastructure |
| Actor | A role or permission checked at the handler | A policy or gate on the command |
| Hot spot | A TODO(owner, date) with a link, or an ADR | An issue with a label hot-spot |
Folder structure from the wall
Go Laravel
internal/sales/ (context) app/Modules/Sales/
order.go Order, Place Domain/Order.php, OrderPlaced.php, PlaceOrder.php
handler.go PlaceOrderHandler Application/PlaceOrderHandler.php
status.go StatusProjection ReadModels/OrderStatusProjector.php
internal/fulfilment/ app/Modules/Fulfilment/
policy.go ReleaseWhenPaid Policies/ReleaseOrderWhenPaid.php
internal/billing/ app/Modules/Billing/Rules that keep the mapping honest:
| Rule | Reason |
|---|---|
| Events use the wall's words, past tense, in the language of their context | Ubiquitous Language |
| One command, one handler, one aggregate, one transaction | Wall grammar = code grammar |
| A policy contains no business rule, only "when X then dispatch Y" | The decision lives in the aggregate |
| Policies and projections are idempotent | At-least-once delivery (Idempotent Consumer) |
| Cross-context types are copied, not imported | Each context owns its model (Service Boundaries) |
| Publish after commit, ideally by an outbox | Outbox |
| A wall change is a rename in code | Keep the names in sync, or the wall dies |
Remote Event Storming Important
In plain words: It works, with smaller groups, shorter sessions and more preparation. It is a second-best choice for Big Picture.
Common misunderstanding: "A Miro board is the same as a paper roll." Brandolini's resources page states it plainly: "Online delivery isn't a good fit for Big Picture... a template alone, without the right facilitation, is not enough to make it work." The Leanpub book has chapters "Big Picture in remote mode" and "Remote Event Storming".
Definition: the format run on an online whiteboard (Miro, Mural, FigJam or similar) with video; Brandolini's pattern "Frame Sorting" says that sorting digital stickies "is less effective than the physical alternative", so sort frames instead.
| Concern | In person | Remote |
|---|---|---|
| Group size | 10 to 30+ | 4 to 8 per board; use breakout boards for more |
| Session length | A day | 90 to 120 minutes, repeated; breaks every 45 minutes |
| Writing in parallel | Markers, natural | Everyone types stickies at once; mute people while writing |
| Reading each other | Walking | Zoom and pan; give everyone cursor colours |
| Noise and energy | Easy | Hard: use voice, short polls, the "Make some noise" pattern |
| Legend | On the wall | Pinned frame on the board |
| Template | Paper roll | Pre-built board with frames per phase, legend, timer |
| Facilitators | 1 to 2 | 2 (one host, one chat and board watcher) |
| Output | Photos | Board export, frames named |
A 2-hour remote Process Modelling session
0:00 Check-in on camera, legend (5 min)
0:05 Timer 10 min: everyone writes events silently
0:15 Enforce the timeline in the main frame (25 min)
0:40 Commands, policies, read models in pairs (30 min)
1:10 Break (10 min)
1:20 Hot spots, vote with dots (20 min)
1:40 Pick one; owners; check-out (20 min)Tools: Miro (the Miro template page lists four stages: collect domain events, refine them into sequence, track causes, re-sort and build bounded contexts); Brandolini's own Process Modelling and Software Design templates for Miro; Mural and FigJam work the same way. The DDD-crew cheat sheet also points to the open-source DDD Toolbox for web-based tools.
Running example: a full run for the ordering business
Setting: an online shop with Catalog, Sales, Billing, Fulfilment and Identity (the contexts used in every DDD chapter). 18 people: 3 from Sales and Support, 2 from Warehouse, 2 from Finance, 1 from Marketing, 1 product owner, 5 developers, 1 tester, 1 ops engineer, 2 facilitators. The sponsor is the head of operations.
Session 1: Big Picture
Chaotic exploration (30 minutes) produced about 220 stickies. After enforcing the timeline and removing duplicates, 64 distinct events remained. The ones that matter here:
| # | Event (orange) | Context (emerging) | Pivotal | Note |
|---|---|---|---|---|
| 1 | Product Listed | Catalog | Marketing, price owner | |
| 2 | Price Changed | Catalog | Two owners disagree | |
| 3 | Cart Checked Out | Sales | ||
| 4 | Order Placed | Sales | yes | Customer and Support care |
| 5 | Order Cancelled | Sales | Before dispatch only? Hot spot | |
| 6 | Payment Captured | Billing | yes | From the payment provider |
| 7 | Payment Failed | Billing | ||
| 8 | Order Released For Picking | Fulfilment | ||
| 9 | Parcel Packed | Fulfilment | ||
| 10 | Parcel Handed To Carrier | Fulfilment | yes | The carrier API |
| 11 | Order Delivered | Fulfilment | Carrier webhook | |
| 12 | Refund Issued | Billing | ||
| 13 | Account Registered | Identity | Separate team |
People and systems. Actors: Customer, Support agent, Picker, Finance clerk. Systems: Payment Provider, Carrier API, ERP (legacy invoicing), Email service.
Hot spots (a selection).
| # | Hot spot | Raised by | Why it hurts |
|---|---|---|---|
| H1 | Payment captured after the customer cancelled? | Finance | Refund work, angry customers |
| H2 | Ship partially if one item is missing? | Warehouse | Shipping cost, customer expectations |
| H3 | Who owns the price: Catalog or Sales? | Marketing, Dev | Orders with stale prices |
| H4 | Is "Order" the same thing for Sales, Warehouse and Finance? | Dev | Three meanings in one table |
| H5 | The ERP closes the day at midnight and rejects late invoices | Finance | Manual rework |
Opportunities. Live parcel tracking on "Order Status"; automatic partial refund when an item is out of stock.
Pick the problem. The group picks H1 (money, high pain) and H2 (cost). Reverse narrative from "Refund Issued" adds "Return Requested" and "Return Received", two missing events.
Resulting contexts.
| Context | Events inside | Language | Subdomain hint |
|---|---|---|---|
| Catalog | Product Listed, Price Changed | Product, Price, Listing | Supporting |
| Sales | Cart Checked Out, Order Placed, Order Cancelled | Order, Line, Cart | Core |
| Billing | Payment Captured, Payment Failed, Refund Issued | Invoice, Payment, Refund | Supporting |
| Fulfilment | Order Released For Picking, Parcel Packed, Parcel Handed To Carrier, Order Delivered | Pick List, Parcel, Carrier | Core or supporting (core only while same-day delivery is the differentiator; Sales is the core) |
| Identity | Account Registered | Account, Credential | Generic |
Session 2: Process Modelling for "place order to ship"
Participants: Sales lead, Finance clerk, Picker, Support agent, two developers, one facilitator. The wall adds blue, lilac, green and pink to the slice (see the diagram in Process and design levels).
| Element | Sticky |
|---|---|
| Events | Order Placed, Payment Captured, Payment Failed, Order Released For Picking, Parcel Packed, Parcel Handed To Carrier |
| Commands | Place Order (Customer), Request Payment (policy), Release Order For Picking (policy), Pack Parcel (Picker), Hand Parcel To Carrier (Picker) |
| Policies | Whenever Order Placed then Request Payment; Whenever Payment Captured then Release Order For Picking; Whenever Payment Failed three times then Cancel Order |
| Read models | Pick List View (SKU, bin, quantity), Order Status (customer), Order Overview (support) |
| External systems | Payment Provider, Carrier API |
| Hot spots | H1 and H2 expanded: "late payment after cancel" gets a policy "Whenever Payment Captured for a cancelled order then Issue Refund" |
Session 3: Software Design for Fulfilment and Sales
| Aggregate | Commands | Events | Invariants |
|---|---|---|---|
| Order (Sales) | Place Order, Cancel Order | Order Placed, Order Cancelled | At least one line; positive quantities; no cancel after dispatch |
| Invoice (Billing) | Request Payment, Issue Refund | Payment Captured, Refund Issued | Settled at most once; refund not above paid |
| Pick List (Fulfilment) | Release Order For Picking, Pack Parcel, Hand Parcel To Carrier | Order Released For Picking, Parcel Packed, Parcel Handed To Carrier | Never pick more than ordered |
The result flows into the Canvas (Bounded Context): Sales publishes sales.order.placed.v1; Billing's policy turns it into a payment request; Fulfilment listens to billing.payment.captured.v1. Integration styles between them are the subject of Context Maps.
| What the three sessions cost | What they saved |
|---|---|
| About 40 person-days spread over 3 weeks (our illustration) | Two months of "what does Order mean?" meetings; a misplaced payment policy found before code |
Go
The module is docs/snippets/ddd/event-storming/go; gofmt -l . is clean, go vet ./... and go test ./... pass. It has two parts: the slice "place order to ship" as code (sales, billing, fulfilment) and stickies plus cmd/escat, a small tool that turns a JSON list of stickies into a Markdown or Go event catalogue.
The wall as data
The JSON is the photograph of the wall. Every sticky has an id, a kind (colour), a context and a text; commands point to actor, aggregate and emitted event; policies point to the event they react to and the command they issue.
[
{"id": "e1", "kind": "event", "context": "sales", "text": "Order Placed", "x": 10, "pivotal": true},
{"id": "c1", "kind": "command", "context": "sales", "text": "Place Order", "x": 10, "actor": "a1", "aggregate": "g1", "emits": "e1"},
{"id": "a1", "kind": "actor", "context": "sales", "text": "Customer"},
{"id": "g1", "kind": "aggregate","context": "sales", "text": "Order", "invariants": ["An order has at least one line", "Quantity of every line is positive"]},
{"id": "p1", "kind": "policy", "context": "billing", "text": "Whenever Order Placed then Request Payment", "x": 20, "on": "e1", "issues": "c2"},
{"id": "c2", "kind": "command", "context": "billing", "text": "Request Payment", "x": 20, "aggregate": "g2", "emits": "e2", "external": "x1"},
{"id": "x1", "kind": "external", "context": "billing", "text": "Payment Provider"},
{"id": "g2", "kind": "aggregate","context": "billing", "text": "Invoice", "invariants": ["An invoice is settled at most once"]},
{"id": "e2", "kind": "event", "context": "billing", "text": "Payment Captured", "x": 30, "pivotal": true},
{"id": "p2", "kind": "policy", "context": "fulfilment", "text": "Whenever Payment Captured then Release Order For Picking", "x": 40, "on": "e2", "issues": "c3"},
{"id": "c3", "kind": "command", "context": "fulfilment", "text": "Release Order For Picking", "x": 40, "aggregate": "g3", "emits": "e3"},
{"id": "g3", "kind": "aggregate","context": "fulfilment", "text": "Pick List", "invariants": ["A picker cannot pick more than ordered"]},
{"id": "e3", "kind": "event", "context": "fulfilment", "text": "Order Released For Picking","x": 50},
{"id": "r1", "kind": "readmodel","context": "fulfilment", "text": "Pick List View", "x": 45, "feeds": "c4"},
{"id": "c4", "kind": "command", "context": "fulfilment", "text": "Pack Parcel", "x": 60, "actor": "a2", "aggregate": "g3", "emits": "e4"},
{"id": "a2", "kind": "actor", "context": "fulfilment", "text": "Picker"},
{"id": "e4", "kind": "event", "context": "fulfilment", "text": "Parcel Packed", "x": 70},
{"id": "c5", "kind": "command", "context": "fulfilment", "text": "Hand Parcel To Carrier", "x": 80, "actor": "a2", "aggregate": "g3", "emits": "e5", "external": "x2"},
{"id": "e5", "kind": "event", "context": "fulfilment", "text": "Parcel Handed To Carrier", "x": 80, "pivotal": true},
{"id": "x2", "kind": "external", "context": "fulfilment", "text": "Carrier API"},
{"id": "r2", "kind": "readmodel","context": "sales", "text": "Order Status", "x": 90},
{"id": "h1", "kind": "hotspot", "context": "billing", "text": "Payment captured after the customer cancelled?", "x": 35},
{"id": "h2", "kind": "hotspot", "context": "fulfilment", "text": "Ship partially when one item is missing?", "x": 55},
{"id": "o1", "kind": "opportunity","context": "sales", "text": "Show live parcel tracking on Order Status", "x": 90}
]Event, command, aggregate, handler
The orange, blue and large yellow stickies of the Sales context, with the two invariants from the wall as exported errors. The handler is the use case: decide, save, publish.
// Package sales is the slice "Place Order" from the wall, in code:
// command -> aggregate -> event, then a read model fed by the event.
package sales
import (
"errors"
"time"
)
// Line is one product and quantity on an order.
type Line struct {
SKU string
Quantity int
}
// PlaceOrder is the blue sticky: the intent of a customer (the yellow actor).
type PlaceOrder struct {
OrderID string
CustomerID string
Lines []Line
}
// OrderPlaced is the orange sticky: a fact, past tense, named like the wall.
type OrderPlaced struct {
OrderID string
CustomerID string
Lines []Line
At time.Time
}
// Errors are the invariants written on the large yellow sticky.
var (
ErrNoLines = errors.New("an order has at least one line")
ErrBadQuantity = errors.New("quantity of every line is positive")
)
// Order is the aggregate: it receives the command, decides, and emits events.
type Order struct {
ID string
placed bool
events []any
}
// Place decides PlaceOrder. It never talks to a database or a broker.
func Place(cmd PlaceOrder, now time.Time) (*Order, error) {
if len(cmd.Lines) == 0 {
return nil, ErrNoLines
}
for _, l := range cmd.Lines {
if l.Quantity <= 0 {
return nil, ErrBadQuantity
}
}
o := &Order{ID: cmd.OrderID, placed: true}
o.events = append(o.events, OrderPlaced{OrderID: cmd.OrderID, CustomerID: cmd.CustomerID, Lines: cmd.Lines, At: now})
return o, nil
}
// PullEvents hands the recorded events to the caller exactly once.
func (o *Order) PullEvents() []any {
out := o.events
o.events = nil
return out
}
// Repository saves the aggregate; the application layer owns the transaction.
type Repository interface {
Save(o *Order, events []any) error
}
// Publisher delivers events after the save (in production: via an outbox).
type Publisher interface {
Publish(event any) error
}
// PlaceOrderHandler is the use case behind the blue sticky.
type PlaceOrderHandler struct {
Repo Repository
Pub Publisher
Now func() time.Time
}
// Handle: load nothing, decide, save, publish.
func (h PlaceOrderHandler) Handle(cmd PlaceOrder) error {
o, err := Place(cmd, h.Now())
if err != nil {
return err
}
events := o.PullEvents()
if err := h.Repo.Save(o, events); err != nil {
return err
}
for _, e := range events {
if err := h.Pub.Publish(e); err != nil {
return err
}
}
return nil
}The tests are the wall sentences: "placing an order emits Order Placed", "an order has at least one line":
package sales_test
import (
"errors"
"testing"
"time"
"academy/event-storming/sales"
)
type fakeRepo struct{ saved int }
func (f *fakeRepo) Save(*sales.Order, []any) error { f.saved++; return nil }
type fakePub struct{ got []any }
func (f *fakePub) Publish(e any) error { f.got = append(f.got, e); return nil }
var now = time.Date(2026, 11, 25, 10, 0, 0, 0, time.UTC)
func TestPlaceOrderEmitsOrderPlaced(t *testing.T) {
repo, pub := &fakeRepo{}, &fakePub{}
h := sales.PlaceOrderHandler{Repo: repo, Pub: pub, Now: func() time.Time { return now }}
err := h.Handle(sales.PlaceOrder{OrderID: "o-1", CustomerID: "c-1", Lines: []sales.Line{{SKU: "BK-1", Quantity: 2}}})
if err != nil {
t.Fatal(err)
}
if repo.saved != 1 || len(pub.got) != 1 {
t.Fatalf("saved=%d published=%d, want 1 and 1", repo.saved, len(pub.got))
}
placed, ok := pub.got[0].(sales.OrderPlaced)
if !ok || placed.OrderID != "o-1" || !placed.At.Equal(now) {
t.Fatalf("unexpected event %#v", pub.got[0])
}
}
func TestInvariantsFromTheYellowSticky(t *testing.T) {
cases := []struct {
name string
lines []sales.Line
want error
}{
{"no lines", nil, sales.ErrNoLines},
{"zero quantity", []sales.Line{{SKU: "BK-1", Quantity: 0}}, sales.ErrBadQuantity},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
_, err := sales.Place(sales.PlaceOrder{OrderID: "o-2", Lines: tc.lines}, now)
if !errors.Is(err, tc.want) {
t.Fatalf("got %v, want %v", err, tc.want)
}
})
}
}
func TestStatusProjectionIsIdempotent(t *testing.T) {
p := sales.NewStatusProjection()
placed := sales.OrderPlaced{OrderID: "o-1"}
p.Apply(placed)
p.Apply(placed) // replay
p.Apply(sales.PaymentSeen{OrderID: "o-1"})
v, _ := p.Get("o-1")
if v.Status != "paid" {
t.Fatalf("status %q, want paid", v.Status)
}
}Policy and read model
The lilac sticky "Whenever Payment Captured then Release Order For Picking" is a listener with its own reading of the message (an anticorruption layer in six lines) and idempotency per order. The decision "can this be released?" belongs to the Pick List aggregate, not to the policy.
// Package fulfilment implements the lilac sticky
// "Whenever Payment Captured then Release Order For Picking".
package fulfilment
import "encoding/json"
// PaymentCaptured is Fulfilment's own reading of the message (anticorruption
// layer): only the field this context needs.
type paymentCaptured struct {
OrderID string `json:"order_id"`
}
// ReleaseOrderForPicking is the blue sticky the policy issues.
type ReleaseOrderForPicking struct{ OrderID string }
// CommandBus is whatever executes commands (a handler, a queue).
type CommandBus interface {
Dispatch(cmd any) error
}
// ReleaseWhenPaid is the policy: a reaction, not a decision. The decision
// (can this be released?) belongs to the Pick List aggregate.
type ReleaseWhenPaid struct {
Bus CommandBus
seen map[string]bool
}
// NewReleaseWhenPaid builds the policy with duplicate protection.
func NewReleaseWhenPaid(bus CommandBus) *ReleaseWhenPaid {
return &ReleaseWhenPaid{Bus: bus, seen: map[string]bool{}}
}
// OnPaymentCaptured is called by the message consumer. Delivery is
// at-least-once, so the policy is idempotent per order.
func (p *ReleaseWhenPaid) OnPaymentCaptured(body []byte) error {
var m paymentCaptured
if err := json.Unmarshal(body, &m); err != nil {
return err
}
if m.OrderID == "" || p.seen[m.OrderID] {
return nil
}
if err := p.Bus.Dispatch(ReleaseOrderForPicking{OrderID: m.OrderID}); err != nil {
return err
}
p.seen[m.OrderID] = true
return nil
}package fulfilment_test
import (
"encoding/json"
"testing"
"academy/event-storming/billing"
"academy/event-storming/fulfilment"
)
type recordBus struct{ got []any }
func (r *recordBus) Dispatch(c any) error { r.got = append(r.got, c); return nil }
func TestWheneverPaymentCapturedThenReleaseForPicking(t *testing.T) {
bus := &recordBus{}
policy := fulfilment.NewReleaseWhenPaid(bus)
body, _ := json.Marshal(billing.PaymentCaptured{OrderID: "o-1", Amount: 4200})
for i := 0; i < 2; i++ { // at-least-once delivery: the same message twice
if err := policy.OnPaymentCaptured(body); err != nil {
t.Fatal(err)
}
}
if len(bus.got) != 1 {
t.Fatalf("dispatched %d commands, want exactly 1", len(bus.got))
}
if cmd, ok := bus.got[0].(fulfilment.ReleaseOrderForPicking); !ok || cmd.OrderID != "o-1" {
t.Fatalf("unexpected command %#v", bus.got[0])
}
}
func TestMalformedMessageIsAnError(t *testing.T) {
if err := fulfilment.NewReleaseWhenPaid(&recordBus{}).OnPaymentCaptured([]byte("{")); err == nil {
t.Fatal("expected a decode error")
}
}The green sticky "Order Status" is a projection that folds events into rows. Replaying an event writes the same row again:
package sales
// OrderStatusView is the green sticky "Order Status": what the customer
// sees. It is built from events and is never the source of truth.
type OrderStatusView struct {
OrderID string
Status string // placed, paid, packed, handed_to_carrier
}
// StatusProjection folds events into views, one row per order.
type StatusProjection struct {
rows map[string]OrderStatusView
}
// NewStatusProjection returns an empty projection.
func NewStatusProjection() *StatusProjection {
return &StatusProjection{rows: map[string]OrderStatusView{}}
}
// Apply is idempotent: replaying an event writes the same row again.
func (p *StatusProjection) Apply(event any) {
switch e := event.(type) {
case OrderPlaced:
p.rows[e.OrderID] = OrderStatusView{OrderID: e.OrderID, Status: "placed"}
case PaymentSeen:
p.rows[e.OrderID] = OrderStatusView{OrderID: e.OrderID, Status: "paid"}
case ParcelSeen:
p.rows[e.OrderID] = OrderStatusView{OrderID: e.OrderID, Status: "handed_to_carrier"}
}
}
// Get returns the view of one order.
func (p *StatusProjection) Get(orderID string) (OrderStatusView, bool) {
v, ok := p.rows[orderID]
return v, ok
}
// PaymentSeen and ParcelSeen are Sales' own copies of the integration
// events it listens to; it never imports another context's types.
type PaymentSeen struct{ OrderID string }
// ParcelSeen is the same for the carrier hand-over.
type ParcelSeen struct{ OrderID string }The projection in SQL, for a real database (PostgreSQL):
-- The read model: disposable, rebuildable from events.
CREATE TABLE order_status_view (
order_id text PRIMARY KEY,
status text NOT NULL,
updated_at timestamptz NOT NULL
);
-- Idempotent projection step for "Order Placed": replay-safe.
INSERT INTO order_status_view (order_id, status, updated_at)
VALUES ($1, 'placed', $2)
ON CONFLICT (order_id) DO UPDATE
SET status = EXCLUDED.status, updated_at = EXCLUDED.updated_at
WHERE order_status_view.updated_at <= EXCLUDED.updated_at; -- ignore late replays of old eventsThe wall checker and the catalogue tool
Check is the grammar of the wall as code: events in past tense, commands in imperative form with an actor or a policy, an aggregate and an emitted event; policies of the form "Whenever ... then ...", aggregates with an invariant.
// Package stickies turns a wall of stickies (JSON) into a checked model and
// an event catalogue. It is the "photo of the wall" in code form.
package stickies
import (
"encoding/json"
"fmt"
"io"
"sort"
"strings"
)
// Kind is the colour of a sticky; the legend is the type system of the wall.
type Kind string
const (
Event Kind = "event" // orange
Command Kind = "command" // blue
Actor Kind = "actor" // small yellow
Aggregate Kind = "aggregate" // large pale yellow
Policy Kind = "policy" // lilac
ReadModel Kind = "readmodel" // green
External Kind = "external" // pink
Hotspot Kind = "hotspot" // neon pink / red, rotated
Opportunity Kind = "opportunity" // green, small
)
// Sticky is one note on the paper roll.
type Sticky struct {
ID string `json:"id"`
Kind Kind `json:"kind"`
Context string `json:"context"`
Text string `json:"text"`
X int `json:"x,omitempty"` // position on the timeline, left to right
Pivotal bool `json:"pivotal,omitempty"`
Actor string `json:"actor,omitempty"` // command: who issues it
Aggregate string `json:"aggregate,omitempty"` // command: who decides
Emits string `json:"emits,omitempty"` // command: which event results
External string `json:"external,omitempty"` // command: external system involved
On string `json:"on,omitempty"` // policy: triggering event
Issues string `json:"issues,omitempty"` // policy: resulting command
Feeds string `json:"feeds,omitempty"` // read model: command it informs
Invariants []string `json:"invariants,omitempty"`
}
// Wall is the whole model.
type Wall struct {
Stickies []Sticky
byID map[string]Sticky
}
// Parse reads the JSON list and indexes it by id.
func Parse(r io.Reader) (*Wall, error) {
var list []Sticky
dec := json.NewDecoder(r)
dec.DisallowUnknownFields()
if err := dec.Decode(&list); err != nil {
return nil, fmt.Errorf("decode wall: %w", err)
}
w := &Wall{Stickies: list, byID: make(map[string]Sticky, len(list))}
for _, s := range list {
if _, dup := w.byID[s.ID]; dup {
return nil, fmt.Errorf("duplicate sticky id %q", s.ID)
}
w.byID[s.ID] = s
}
return w, nil
}
var irregularPast = map[string]bool{"Paid": true, "Sent": true, "Built": true, "Lost": true, "Left": true, "Bought": true, "Sold": true}
// IsPastTense is a deliberately small heuristic: events are facts.
func IsPastTense(text string) bool {
words := strings.Fields(text)
if len(words) == 0 {
return false
}
// "Parcel Handed To Carrier": look for any past participle in the phrase.
for _, w := range words {
if strings.HasSuffix(w, "ed") || irregularPast[w] {
return true
}
}
return false
}
// Check enforces the grammar of the wall and returns every problem found:
// an actor issues a command on an aggregate which emits an event; a policy
// reacts "whenever ... then ...".
func (w *Wall) Check() []string {
var problems []string
add := func(s Sticky, format string, args ...any) {
problems = append(problems, fmt.Sprintf("%s (%s %q): %s", s.ID, s.Kind, s.Text, fmt.Sprintf(format, args...)))
}
ref := func(s Sticky, field, id string, want Kind) {
if id == "" {
return
}
t, ok := w.byID[id]
switch {
case !ok:
add(s, "%s points to unknown sticky %q", field, id)
case t.Kind != want:
add(s, "%s %q is a %s, want %s", field, id, t.Kind, want)
}
}
for _, s := range w.Stickies {
if s.Context == "" {
add(s, "no context (which part of the wall is it on?)")
}
switch s.Kind {
case Event:
if !IsPastTense(s.Text) {
add(s, "an event is a fact in the past tense")
}
case Command:
if IsPastTense(s.Text) {
add(s, "a command is an imperative, not a fact")
}
if s.Actor == "" && !w.issuedByPolicy(s.ID) {
add(s, "nobody issues it: add an actor or a policy")
}
if s.Aggregate == "" {
add(s, "no aggregate decides it")
}
if s.Emits == "" {
add(s, "a command that emits nothing is a wish")
}
ref(s, "actor", s.Actor, Actor)
ref(s, "aggregate", s.Aggregate, Aggregate)
ref(s, "emits", s.Emits, Event)
ref(s, "external", s.External, External)
case Policy:
lower := strings.ToLower(s.Text)
if !strings.HasPrefix(lower, "whenever ") || !strings.Contains(lower, " then ") {
add(s, `a policy reads "Whenever <event> then <command>"`)
}
ref(s, "on", s.On, Event)
ref(s, "issues", s.Issues, Command)
case ReadModel:
ref(s, "feeds", s.Feeds, Command)
case Aggregate:
if len(s.Invariants) == 0 {
add(s, "an aggregate without an invariant is a table")
}
case Actor, External, Hotspot, Opportunity:
// no extra grammar
default:
add(s, "unknown colour %q", s.Kind)
}
}
sort.Strings(problems)
return problems
}
func (w *Wall) issuedByPolicy(commandID string) bool {
for _, s := range w.Stickies {
if s.Kind == Policy && s.Issues == commandID {
return true
}
}
return false
}
// Timeline returns stickies of one kind ordered left to right.
func (w *Wall) Timeline(k Kind) []Sticky {
var out []Sticky
for _, s := range w.Stickies {
if s.Kind == k {
out = append(out, s)
}
}
sort.SliceStable(out, func(i, j int) bool { return out[i].X < out[j].X })
return out
}
// Lookup returns a sticky by id.
func (w *Wall) Lookup(id string) (Sticky, bool) { s, ok := w.byID[id]; return s, ok }The catalogue writers produce a Markdown table for the wiki and a gofmt-clean Go file with constants for event and command names, so that a rename on the wall breaks the build instead of drifting:
package stickies
import (
"bytes"
"fmt"
"go/format"
"io"
"strings"
"unicode"
)
// Slug turns "Order Placed" into "order_placed".
func Slug(text string) string {
var b strings.Builder
for _, r := range strings.TrimSpace(text) {
switch {
case unicode.IsLetter(r) || unicode.IsDigit(r):
b.WriteRune(unicode.ToLower(r))
case b.Len() > 0 && !strings.HasSuffix(b.String(), "_"):
b.WriteRune('_')
}
}
return strings.TrimSuffix(b.String(), "_")
}
// Pascal turns "Order Placed" into "OrderPlaced".
func Pascal(text string) string {
var b strings.Builder
for _, w := range strings.FieldsFunc(text, func(r rune) bool { return !unicode.IsLetter(r) && !unicode.IsDigit(r) }) {
b.WriteString(strings.ToUpper(w[:1]) + w[1:])
}
return b.String()
}
// EventName is the integration type on the wire:
// context.aggregate.fact.v1, so "Order Placed" in sales becomes
// sales.order.placed.v1 (see Domain Events vs Integration Events). The
// domain event itself keeps the class name (OrderPlaced).
func EventName(s Sticky) string {
return s.Context + "." + strings.Replace(Slug(s.Text), "_", ".", 1) + ".v1"
}
// WriteMarkdown prints the event catalogue: one row per event with the
// command that causes it, the aggregate that decides, and the policies
// that react.
func (w *Wall) WriteMarkdown(out io.Writer) error {
fmt.Fprintln(out, "| Event | Context | Caused by | Decided by | Reacted to by | Pivotal |")
fmt.Fprintln(out, "| --- | --- | --- | --- | --- | --- |")
for _, e := range w.Timeline(Event) {
cause, decider := "-", "-"
for _, c := range w.Stickies {
if c.Kind == Command && c.Emits == e.ID {
cause = c.Text
if c.Actor != "" {
cause += " (by " + w.byID[c.Actor].Text + ")"
} else if p := w.policyIssuing(c.ID); p != "" {
cause += " (by policy)"
}
if g, ok := w.byID[c.Aggregate]; ok {
decider = g.Text
}
}
}
var reacts []string
for _, p := range w.Stickies {
if p.Kind == Policy && p.On == e.ID {
reacts = append(reacts, p.Text)
}
}
if len(reacts) == 0 {
reacts = []string{"-"}
}
piv := ""
if e.Pivotal {
piv = "yes"
}
if _, err := fmt.Fprintf(out, "| `%s` | %s | %s | %s | %s | %s |\n",
EventName(e), e.Context, cause, decider, strings.Join(reacts, "; "), piv); err != nil {
return err
}
}
return nil
}
func (w *Wall) policyIssuing(commandID string) string {
for _, s := range w.Stickies {
if s.Kind == Policy && s.Issues == commandID {
return s.ID
}
}
return ""
}
// WriteGo prints a Go file with one constant per event and per command, so
// handlers and tests refer to the wall's words and a renamed sticky breaks
// the build instead of silently drifting.
func (w *Wall) WriteGo(out io.Writer, pkg string) error {
var buf bytes.Buffer
fmt.Fprintf(&buf, "// Code generated by escat from the event storming wall. DO NOT EDIT.\n\npackage %s\n\n", pkg)
events := w.Timeline(Event)
commands := w.Timeline(Command)
fmt.Fprintln(&buf, "// Domain events by name on the wire.")
fmt.Fprintln(&buf, "const (")
for _, e := range events {
fmt.Fprintf(&buf, "\tEvent%s = %q\n", Pascal(e.Text), EventName(e))
}
fmt.Fprintln(&buf, ")")
fmt.Fprintln(&buf)
fmt.Fprintln(&buf, "// Commands by name; the value is the use case a handler implements.")
fmt.Fprintln(&buf, "const (")
for _, c := range commands {
fmt.Fprintf(&buf, "\tCommand%s = %q\n", Pascal(c.Text), c.Context+"."+Slug(c.Text))
}
fmt.Fprintln(&buf, ")")
src, err := format.Source(buf.Bytes()) // the generated file is gofmt-clean
if err != nil {
return err
}
_, err = out.Write(src)
return err
}// Command escat reads a JSON wall and prints the event catalogue.
//
// escat -format md wall/ordering.json
// escat -format go -pkg catalogue wall/ordering.json
package main
import (
"flag"
"fmt"
"os"
"academy/event-storming/stickies"
)
func main() {
format := flag.String("format", "md", "md or go")
pkg := flag.String("pkg", "catalogue", "package name for -format go")
flag.Parse()
if flag.NArg() != 1 {
fmt.Fprintln(os.Stderr, "usage: escat [-format md|go] wall.json")
os.Exit(2)
}
f, err := os.Open(flag.Arg(0))
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
defer f.Close()
wall, err := stickies.Parse(f)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
if problems := wall.Check(); len(problems) > 0 {
for _, p := range problems {
fmt.Fprintln(os.Stderr, "wall problem:", p)
}
os.Exit(1)
}
switch *format {
case "md":
err = wall.WriteMarkdown(os.Stdout)
case "go":
err = wall.WriteGo(os.Stdout, *pkg)
default:
err = fmt.Errorf("unknown format %q", *format)
}
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}package stickies_test
import (
"os"
"strings"
"testing"
"academy/event-storming/stickies"
)
func load(t *testing.T) *stickies.Wall {
t.Helper()
f, err := os.Open("../wall/ordering.json")
if err != nil {
t.Fatal(err)
}
defer f.Close()
w, err := stickies.Parse(f)
if err != nil {
t.Fatal(err)
}
return w
}
func TestOrderingWallFollowsTheGrammar(t *testing.T) {
if problems := load(t).Check(); len(problems) != 0 {
t.Fatalf("wall problems:\n%s", strings.Join(problems, "\n"))
}
}
func TestGrammarCatchesBrokenSentences(t *testing.T) {
wall := `[
{"id":"e1","kind":"event","context":"sales","text":"Place Order"},
{"id":"c1","kind":"command","context":"sales","text":"Order Placed"},
{"id":"p1","kind":"policy","context":"billing","text":"Request Payment"},
{"id":"g1","kind":"aggregate","context":"sales","text":"Order"}
]`
w, err := stickies.Parse(strings.NewReader(wall))
if err != nil {
t.Fatal(err)
}
got := strings.Join(w.Check(), "\n")
for _, want := range []string{
"an event is a fact in the past tense",
"a command is an imperative, not a fact",
"no aggregate decides it",
`a policy reads "Whenever <event> then <command>"`,
"an aggregate without an invariant is a table",
} {
if !strings.Contains(got, want) {
t.Errorf("missing problem %q in:\n%s", want, got)
}
}
}
func TestParseRejectsUnknownFieldsAndDuplicates(t *testing.T) {
if _, err := stickies.Parse(strings.NewReader(`[{"id":"a","kind":"event","colour":"orange"}]`)); err == nil {
t.Error("unknown field must be rejected")
}
if _, err := stickies.Parse(strings.NewReader(`[{"id":"a"},{"id":"a"}]`)); err == nil {
t.Error("duplicate id must be rejected")
}
}
func TestCatalogueMarkdown(t *testing.T) {
var b strings.Builder
if err := load(t).WriteMarkdown(&b); err != nil {
t.Fatal(err)
}
out := b.String()
for _, want := range []string{
"| `sales.order.placed.v1` | sales | Place Order (by Customer) | Order | Whenever Order Placed then Request Payment | yes |",
"| `billing.payment.captured.v1` | billing | Request Payment (by policy) | Invoice | Whenever Payment Captured then Release Order For Picking | yes |",
} {
if !strings.Contains(out, want) {
t.Errorf("catalogue lacks row %q in:\n%s", want, out)
}
}
}
func TestCatalogueGo(t *testing.T) {
var b strings.Builder
if err := load(t).WriteGo(&b, "catalogue"); err != nil {
t.Fatal(err)
}
for _, want := range []string{
`EventOrderPlaced`, `"sales.order.placed.v1"`,
`CommandPlaceOrder`, `"sales.place_order"`,
"package catalogue",
} {
if !strings.Contains(b.String(), want) {
t.Errorf("generated Go lacks %q", want)
}
}
}Run on the wall above (this output was produced by running the tool):
$ go run ./cmd/escat -format md wall/ordering.json
| Event | Context | Caused by | Decided by | Reacted to by | Pivotal |
| --- | --- | --- | --- | --- | --- |
| `sales.order.placed.v1` | sales | Place Order (by Customer) | Order | Whenever Order Placed then Request Payment | yes |
| `billing.payment.captured.v1` | billing | Request Payment (by policy) | Invoice | Whenever Payment Captured then Release Order For Picking | yes |
| `fulfilment.order.released_for_picking.v1` | fulfilment | Release Order For Picking (by policy) | Pick List | - | |
| `fulfilment.parcel.packed.v1` | fulfilment | Pack Parcel (by Picker) | Pick List | - | |
| `fulfilment.parcel.handed_to_carrier.v1` | fulfilment | Hand Parcel To Carrier (by Picker) | Pick List | - | yes |The Go angle
| Question | Go answer |
|---|---|
| Where do events live? | In the context's package, as plain structs; the escat constants carry the wire names |
| How do I keep contexts apart? | Package per context, internal/, types copied across a boundary (Bounded Context has the import test) |
| Where is the command bus? | Usually no bus: call the handler; a small interface (CommandBus) only where a policy dispatches |
| How do I publish after commit? | Handler saves and returns; an outbox relay publishes (Outbox); Watermill is a common library for the router |
| How do I read JSON strictly? | json.Decoder.DisallowUnknownFields as in Parse, so a typo on the wall is an error |
| How do I generate code safely? | go/format.Source over the text, so the output is gofmt-clean |
Laravel
Laravel 13 (PHP 8.4), modular monolith layout app/Modules/<Context>. The PHP is reviewed, not run (PHP is not installed on the authoring machine); every Laravel API named below was checked in the Laravel 13 docs (Events: ShouldDispatchAfterCommit; Query builder: upsert, insertOrIgnore).
Command, event, aggregate
<?php
declare(strict_types=1);
namespace App\Modules\Sales\Domain;
/** The blue sticky: the intent of a customer, as a plain immutable message. */
final readonly class PlaceOrder
{
/** @param list<array{sku: string, quantity: int}> $lines */
public function __construct(
public string $orderId,
public string $customerId,
public array $lines,
) {}
}<?php
declare(strict_types=1);
namespace App\Modules\Sales\Domain;
use DateTimeImmutable;
use Illuminate\Contracts\Events\ShouldDispatchAfterCommit;
/**
* The orange sticky: a fact in the past tense, named exactly like the wall.
* The class name is the domain event's name; the outbox translator publishes
* it as sales.order.placed.v1 (the integration contract).
*/
final readonly class OrderPlaced implements ShouldDispatchAfterCommit
{
/** @param list<array{sku: string, quantity: int}> $lines */
public function __construct(
public string $orderId,
public string $customerId,
public array $lines,
public DateTimeImmutable $at,
) {}
}<?php
declare(strict_types=1);
namespace App\Modules\Sales\Domain;
use DateTimeImmutable;
use DomainException;
/** The large yellow sticky: receives the command, decides, emits events. */
final class Order
{
/** @var list<object> */
private array $events = [];
private function __construct(public readonly string $id) {}
public static function place(PlaceOrder $command, DateTimeImmutable $now): self
{
// Invariants written on the sticky.
if ($command->lines === []) {
throw new DomainException('An order has at least one line.');
}
foreach ($command->lines as $line) {
if ($line['quantity'] <= 0) {
throw new DomainException('Quantity of every line is positive.');
}
}
$order = new self($command->orderId);
$order->events[] = new OrderPlaced($command->orderId, $command->customerId, $command->lines, $now);
return $order;
}
/** @return list<object> */
public function pullEvents(): array
{
$events = $this->events;
$this->events = [];
return $events;
}
}Handler
The handler is the blue sticky as a use case. OrderPlaced implements ShouldDispatchAfterCommit, so its listeners run only if the transaction commits; for cross-service delivery use an outbox (Outbox).
<?php
declare(strict_types=1);
namespace App\Modules\Sales\Application;
use App\Modules\Sales\Domain\Order;
use App\Modules\Sales\Domain\PlaceOrder;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Facades\DB;
/** The use case behind the blue sticky: decide, save, publish after commit. */
final class PlaceOrderHandler
{
public function __construct(private readonly Dispatcher $events) {}
public function __invoke(PlaceOrder $command): void
{
$order = Order::place($command, new \DateTimeImmutable());
DB::transaction(function () use ($order): void {
DB::table('orders')->insert(['id' => $order->id, 'state' => 'placed']);
foreach ($order->pullEvents() as $event) {
// OrderPlaced implements ShouldDispatchAfterCommit: listeners
// run only after this transaction commits.
$this->events->dispatch($event);
}
});
}
}Policy and read model
<?php
declare(strict_types=1);
namespace App\Modules\Fulfilment\Policies;
use App\Modules\Fulfilment\Application\ReleaseOrderForPicking;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\DB;
/**
* The lilac sticky: "Whenever Payment Captured then Release Order For Picking".
* A policy reacts; the Pick List aggregate decides.
*/
final class ReleaseOrderWhenPaid implements ShouldQueue
{
public string $queue = 'fulfilment';
/** @param array{order_id: string} $paymentCaptured Billing's published message */
public function handle(array $paymentCaptured): void
{
$orderId = $paymentCaptured['order_id'];
// At-least-once delivery: a unique key makes the second call a no-op.
$inserted = DB::table('fulfilment_released_orders')->insertOrIgnore([
'order_id' => $orderId,
'released_at' => now(),
]);
if ($inserted === 0) {
return;
}
ReleaseOrderForPicking::dispatchSync($orderId);
}
}<?php
declare(strict_types=1);
namespace App\Modules\Fulfilment\Application;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Support\Facades\DB;
/** The blue sticky issued by the policy; the Pick List aggregate decides. */
final class ReleaseOrderForPicking
{
use Dispatchable;
public function __construct(public readonly string $orderId) {}
public function handle(): void
{
// Load the PickList aggregate, call release(), save, emit
// OrderReleasedForPicking. Sketched as one row for the slice.
DB::table('pick_lists')->insertOrIgnore(['order_id' => $this->orderId, 'state' => 'released']);
}
}<?php
declare(strict_types=1);
namespace App\Modules\Sales\ReadModels;
use App\Modules\Sales\Domain\OrderPlaced;
use Illuminate\Support\Facades\DB;
/**
* The green sticky "Order Status": a table built from events.
* upsert() makes a replay write the same row again (idempotent).
*/
final class OrderStatusProjector
{
public function handle(OrderPlaced $event): void
{
DB::table('order_status_view')->upsert(
[['order_id' => $event->orderId, 'status' => 'placed', 'updated_at' => $event->at->format('Y-m-d H:i:s')]],
['order_id'],
['status', 'updated_at'],
);
}
}<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
// The read model: disposable, rebuildable from events.
Schema::create('order_status_view', function (Blueprint $table): void {
$table->string('order_id')->primary();
$table->string('status');
$table->timestamp('updated_at');
});
// Policy guard: one release per order, even if the message repeats.
Schema::create('fulfilment_released_orders', function (Blueprint $table): void {
$table->string('order_id')->primary();
$table->timestamp('released_at');
});
Schema::create('pick_lists', function (Blueprint $table): void {
$table->string('order_id')->primary();
$table->string('state');
});
}
public function down(): void
{
Schema::dropIfExists('pick_lists');
Schema::dropIfExists('fulfilment_released_orders');
Schema::dropIfExists('order_status_view');
}
};The catalogue as an Artisan command
<?php
declare(strict_types=1);
namespace App\Console\Commands;
use Illuminate\Console\Command;
/** php artisan es:catalogue wall/ordering.json -> Markdown event catalogue */
final class EventCatalogue extends Command
{
protected $signature = 'es:catalogue {wall : path to the JSON list of stickies}';
protected $description = 'Turn a JSON list of stickies into a Markdown event catalogue';
public function handle(): int
{
$stickies = json_decode((string) file_get_contents($this->argument('wall')), true, 512, JSON_THROW_ON_ERROR);
$byId = array_column($stickies, null, 'id');
$events = array_values(array_filter($stickies, fn (array $s) => $s['kind'] === 'event'));
usort($events, fn (array $a, array $b) => ($a['x'] ?? 0) <=> ($b['x'] ?? 0));
$this->line('| Event | Context | Caused by | Decided by | Reacted to by | Pivotal |');
$this->line('| --- | --- | --- | --- | --- | --- |');
foreach ($events as $event) {
$cause = '-';
$decider = '-';
foreach ($stickies as $s) {
if ($s['kind'] === 'command' && ($s['emits'] ?? null) === $event['id']) {
$cause = $s['text'] . (isset($s['actor']) ? ' (by ' . $byId[$s['actor']]['text'] . ')' : ' (by policy)');
$decider = $byId[$s['aggregate']]['text'] ?? '-';
}
}
$reacts = array_map(
fn (array $p) => $p['text'],
array_filter($stickies, fn (array $p) => $p['kind'] === 'policy' && ($p['on'] ?? null) === $event['id']),
);
// context.aggregate.fact.v1: "Order Placed" in sales -> sales.order.placed.v1
$slug = strtolower(trim((string) preg_replace('/[^A-Za-z0-9]+/', '_', $event['text']), '_'));
$name = $event['context'] . '.' . preg_replace('/_/', '.', $slug, 1) . '.v1';
$this->line(sprintf(
'| `%s` | %s | %s | %s | %s | %s |',
$name,
$event['context'],
$cause,
$decider,
$reacts === [] ? '-' : implode('; ', $reacts),
($event['pivotal'] ?? false) ? 'yes' : '',
));
}
return self::SUCCESS;
}
}Tests (Pest)
<?php
declare(strict_types=1);
use App\Modules\Sales\Domain\Order;
use App\Modules\Sales\Domain\OrderPlaced;
use App\Modules\Sales\Domain\PlaceOrder;
$now = new DateTimeImmutable('2026-11-25 10:00:00');
describe('Place Order (slice from the wall)', function () use ($now) {
it('emits OrderPlaced when a customer places an order', function () use ($now) {
$order = Order::place(new PlaceOrder('o-1', 'c-1', [['sku' => 'BK-1', 'quantity' => 2]]), $now);
$events = $order->pullEvents();
expect($events)->toHaveCount(1)
->and($events[0])->toBeInstanceOf(OrderPlaced::class)
->and($events[0]->orderId)->toBe('o-1')
->and($order->pullEvents())->toBeEmpty();
});
it('refuses an order without lines', function () use ($now) {
Order::place(new PlaceOrder('o-2', 'c-1', []), $now);
})->throws(DomainException::class, 'at least one line');
it('refuses a zero quantity', function () use ($now) {
Order::place(new PlaceOrder('o-3', 'c-1', [['sku' => 'BK-1', 'quantity' => 0]]), $now);
})->throws(DomainException::class, 'Quantity of every line is positive');
});<?php
declare(strict_types=1);
use Illuminate\Support\Facades\DB;
use App\Modules\Fulfilment\Policies\ReleaseOrderWhenPaid;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
it('releases an order once even if PaymentCaptured is delivered twice', function () {
$policy = new ReleaseOrderWhenPaid();
$policy->handle(['order_id' => 'o-1']);
$policy->handle(['order_id' => 'o-1']); // duplicate delivery
expect(DB::table('fulfilment_released_orders')->where('order_id', 'o-1')->count())->toBe(1);
});The Laravel angle
| Question | Laravel answer |
|---|---|
| Where do events and commands go? | Domain namespace of the module, readonly classes |
| Where does the handler go? | Application namespace; invokable class; called from a controller, a console command or a queued job |
| How is a policy wired? | A queued listener (ShouldQueue) registered for the event in the module's service provider; Laravel 13 can discover listeners by their handle type hints |
| After commit | ShouldDispatchAfterCommit on the event, or ShouldQueueAfterCommit on the listener, so nothing runs before the data exists |
| Idempotency | A unique key plus insertOrIgnore, or upsert for read models |
| How do I keep modules apart? | Pest arch() tests (see Ubiquitous Language), and no Eloquent model shared across modules |
Solving the classic problems: common failures
The failures table
| Failure | What it looks like | Why it happens | Fix |
|---|---|---|---|
| Too few experts | The wall is correct per the developers and wrong per the warehouse | Experts were "too busy" | Postpone the session; invite by the question; phone a friend; ask the sponsor to release them |
| Developers model instead of explore | Stickies named OrderService, OrderRepository, arrows between "services" | Habit; they think in boxes | Ask developers to write only events first; "Parcel Packed" not "PackService" |
| UML or BPMN on the wall | Decision diamonds, swimlane diagrams with arrows | Process modellers take over | Remove arrows; tell the story aloud; hot spots for decisions |
| Stopping after the Big Picture | Beautiful wall, no change | No next owner | End with next steps and dates; schedule process and design sessions |
| No follow-up | The photo dies in a folder | Documentation is "tricky" | Next-week summary, hot-spot owners, review in a month |
| Facilitator models | The group nods, the model is theirs only | Impatience | Facilitator asks, never writes (except hot spots) |
| Too much notation too soon | People ask "which colour?" for ten minutes | Legend dumped at the start | Incremental notation: events first |
| One loud person dominates | Others stop writing | Hierarchy | One person, one marker; silent writing first; round-robin |
| The wrong group size | 40 people, nobody hears | Everyone invited | Use the Big Picture for 10 to 30; split for more |
| Solutions in the Big Picture | Hours on "should we use Kafka?" | Developer instinct | Hot spot; "later, in design" |
| Treating swimlanes as contexts | One context per department | Org chart bias | Look for language changes and pivotal events |
| Remote fatigue | Silence on camera after 40 min | Online format | Shorter sessions, breaks, smaller boards |
| Wall frozen in time | A year later nobody trusts it | Business changed | Review, re-run small sessions on change |
Measuring value
In plain words: Count what the session changed, not how many stickies it produced.
Common misunderstanding: "More stickies means a better workshop." Stickies are a means; decisions and shared understanding are the value. Brandolini's Big Picture chapter even has a section "How do we know we did a good job?".
| Metric | How to measure | Healthy sign |
|---|---|---|
| Shared understanding | Ask 5 participants, a week later, to tell the story in 2 minutes | Stories match |
| Hot spots resolved | Count with owner and date, closed in 30 days | More than half |
| Decisions made | ADRs or tickets created from the wall | At least 3 |
| Missing events found | New events added in the reverse narrative | Several |
| Context candidates | Names with a one-line purpose | 3 to 8 for a mid-sized business |
| Reuse | Pages or code using the wall's names | Names in code and tickets |
| Participant feedback | One-question poll at check-out ("would you do this again?") | Mostly yes |
| Time to first slice | Days from workshop to first deployed slice | Under 3 weeks |
Choosing
| Situation | Choose | Group | Output to aim for |
|---|---|---|---|
| New domain, many departments, split planned | Big Picture, in person | 12 to 25 | Pivotal events, context candidates, hot spots |
| One painful process (refunds, onboarding) | Process Modelling | 5 to 8 who run it | Policies, read models, bottlenecks |
| One module to build next sprint | Software Design | 3 developers, 2 experts | Aggregates, commands, events, tests |
| New hires induction | Small Big Picture on one flow | 6 to 10 | Shared story |
| Remote-only company | Process or Design; Big Picture only with an experienced facilitator | 4 to 8 | Same, smaller scope |
| Only developers available | Do not run it; first get an expert | none | Interviews instead |
| Heavy legacy, no one knows the rules | Big Picture + "phone a friend" + code archaeology | Experts and maintainers | Hot spot list |
| Regulated flow (payments, health) | Process Modelling with compliance in the room | 6 to 10 | Policies with audit needs |
| Tiny team, one product | Skip the formal workshop; a 90-minute Process Modelling on a whiteboard | 3 to 5 | A list of events and commands |
In architecture: from a single process to a distributed system
Monolith: one process, one database
The wall maps to packages inside one deployable. Events are in-process calls after commit (Laravel events, Go function callbacks), policies are listeners, read models are database views or tables updated in the same transaction. The simplest correct usage: the wall's event names become class names and test names. Example: the ordering shop in one Laravel app, OrderPlaced fires after the transaction, OrderStatusProjector updates order_status_view, and a Pest test says "placing an order emits OrderPlaced".
Modular monolith and multiple databases
Emerging contexts become modules with their own namespace (app/Modules/Sales) or Go packages under internal/. A policy that listens to another module's event reads a copy of the message type (an ACL), not the module's class. Each module owns its tables, even if they share one database server (Modular Monolith, Service Boundaries). The wall's lilac policies cross the module line; each one is now a contract that deserves a name and a version (billing.payment.captured.v1).
Microservices: the boundary becomes a network
A policy that crosses contexts becomes a message over a broker or an HTTP callback; the command it issues is a call on the other side. Delivery is at least once, so the policy must be idempotent; a lost event is a lost reaction; a refusal needs a compensation (Saga). Data ownership follows contexts (Data Ownership); read models that need data from several contexts become projections built from events (Data Patterns).
Place order across three services
1 Customer -> Sales API POST /orders (Place Order)
2 Sales saves Order + outbox row in one transaction (Order Placed)
3 Relay publishes sales.order.placed.v1 -> broker
4 Billing policy: whenever Order Placed -> Request Payment (Payment Provider)
5 Billing saves Invoice + outbox: billing.payment.captured.v1
6 Fulfilment policy: whenever Payment Captured -> Release Order For Picking
7 Sales projection updates Order Status from all three events
failure: step 6 repeats (duplicate) -> idempotent policy ignores; step 4 fails -> retry, then compensating Cancel OrderDistributed data: replicas, caches and multi-region
Read models are copies, so they lag. A customer who just placed an order and opens "Order Status" may see nothing yet; the wall's read-model sticky should say how fresh it must be, and the UI should show "processing" instead of an error. In multi-region setups the order of events across regions is not total; events carry ids and versions (.v1), and consumers are idempotent. A cached "Order Status" has a time to live that the experts accepted at the session. See Eventual Consistency in Databases and Replication.
Scaling path: 1×, 10×, 100×
| Scale | How the Event Storming outputs are used |
|---|---|
| 1× (one team, one app) | One Big Picture, one design session, a wall photo, names in code; the catalogue is a Markdown file generated by the tool |
| 10× (several teams) | Big Picture per product line; context candidates become team ownership; the catalogue becomes a repository with CI that runs escat and fails on grammar errors |
| 100× (many teams, many services) | Event catalogue as a schema registry or AsyncAPI document (Message Design); regular, smaller sessions per change; a published context map |
Lab: run a mini Event Storming and generate the catalogue
Goal: run a 90-minute Process Modelling session for a tiny domain (a library, a bakery, your team's release process), then turn the wall into a catalogue with the tool. The workshop part is an exercise; the commands below were run for the output shown, the rest is "expected, not run".
- Prepare. Tape a 3 m strip of paper to a wall. Orange, blue, lilac, green, pink stickies; one marker per person. Invite 4 to 6 people, one of whom knows the process well.
- Chaotic exploration (10 min). Everybody writes events alone, in past tense, one per sticky. No talking.
- Enforce the timeline (20 min). Talk, merge, order left to right. Count the duplicates.
- Add commands and policies (25 min). For each event ask "what triggered this?" Blue for a person, lilac if a reaction. Write "Whenever X then Y".
- Add hot spots (10 min). At least three. If there are none, you were too polite.
- Type the wall into JSON. One entry per sticky, using the schema in
wall/ordering.json. - Run the checker and the tool.
cd docs/snippets/ddd/event-storming/go
go test ./...
go run ./cmd/escat -format md wall/ordering.json
go run ./cmd/escat -format go -pkg catalogue wall/ordering.json > catalogue.go
gofmt -l catalogue.go # prints nothing: the generated file is gofmt-cleanExpected output (run on this machine for the ordering wall): the Markdown table shown in Go and a catalogue.go with EventOrderPlaced = "sales.order.placed.v1" and CommandPlaceOrder = "sales.place_order".
- Break the wall on purpose. Change
"Order Placed"to"Place Order"in the first event and run the tool again. Expected, not run exactly as shown, but the tests instickies_test.gocover it:
wall problem: e1 (event "Place Order"): an event is a fact in the past tense- Laravel.
php artisan es:catalogue wall/ordering.jsonprints the same table (expected, not run: PHP is not installed here). - Follow up. Pick one hot spot, name an owner and a date. Without this the lab is a game.
Common misconceptions
| Belief | Reality |
|---|---|
| Event Storming is a UML replacement | It is a conversation; the notation is intentionally poor so that experts can join |
| Developers should lead the modelling | Experts and developers explore together; developers ask, experts answer |
| The colours are mandatory | They are conventions that help; introduce them step by step; Brandolini warns against "Precise Notation" |
| One workshop is enough | Big Picture finds where to dig; process and design sessions follow |
| Swimlanes show the bounded contexts | Contexts emerge from pivotal events and language changes, not from the org chart |
| More stickies is a better session | Shared understanding and decisions are the output |
| Event Storming only works with Event Sourcing | The 2013 article says it fits event sourcing well, but the resulting model works with any DDD implementation |
| Remote is the same as in person | Online is a poor fit for Big Picture and needs smaller groups and shorter sessions |
| An aggregate is a table | It is the part that decides and keeps rules true |
| The wall is the documentation | The wall is a means; a one-page summary, a context list and a catalogue are the documentation |
| A hot spot means failure | It is the most valuable output |
| The facilitator must know the domain | They need to know the format; the experts know the domain |
Cheat sheet
| Topic | What to remember |
|---|---|
| Goal | Shared understanding and discovered conflict, not a perfect diagram |
| Flavours | Big Picture (whole business), Process Modelling (one process), Software Design (one context) |
| Orange | Domain event, past tense, one fact |
| Blue | Command, imperative, from actor or policy |
| Yellow | Small: actor. Large: aggregate or constraint, with an invariant |
| Lilac | Policy: "whenever X then Y" |
| Green | Read model; also opportunities (small green) |
| Pink | Wide: external system. Neon, tilted: hot spot |
| Grammar | Actor, command, aggregate, event; policy turns an event into the next command |
| Invite | Experts of every department plus developers; 10 to 30 for Big Picture, 5 to 10 for the others |
| Room | 6 to 8 m of wall, paper roll, no chairs, one marker per person |
| Phases | Kick-off, chaotic exploration, enforce the timeline, people and systems, problems and opportunities, pick the problem, reverse narrative |
| Facilitator | Neutral, asks, writes hot spots, does not model, manages energy |
| Boundaries | Pivotal events and language changes, not swimlanes |
| Outputs | Contexts, aggregates, events, commands, policies, read models, hot spots with owners |
| Code | Keep the names; events past tense; policies idempotent; publish after commit |
| Remote | Smaller groups, shorter sessions, templates; poor for Big Picture |
| Failure | Too few experts, developers modelling, UML on the wall, no follow-up |
Self-check: questions & answers
- Must-know asked in almost every interview
- Important frequent; expected at senior level
- Good to know extra depth that sets you apart
1 — Why does Event Storming start with events and not with entities or classes? Must-know
Answer
Answer: Events are facts anyone can name and verify; a data model starts a debate about structure before the group shares a story. Starting from behaviour also avoids letting a table drive the design (Brandolini 2013: "this ain't no data model").
2 — Name the three flavours and one question each answers. Important
Answer
Answer: Big Picture: what happens in the whole business and where does it hurt. Process Modelling: how does one process run and what is wrong with it. Software Design: what should the code of one context look like.
3 — Write the full grammar of the wall in one sentence. Good to know
Answer
Answer: An actor issues a command on an aggregate, which decides and emits an event; a policy reacts to the event ("whenever X then Y") and issues the next command; a read model gives the actor the information needed to decide.
4 — What is the difference between a policy and an invariant? Must-know
Answer
Answer: A policy reacts to something that happened and issues a command; an invariant is a rule the aggregate keeps true when it decides. "Whenever Payment Captured then Release Order For Picking" versus "An invoice is settled at most once".
5 — Why do people write events alone and silently in the first phase? Important
Answer
Answer: To avoid bias and early arguments; the goal is to get every person's perception onto the paper. Talking starts in "enforce the timeline".
6 — How do pivotal events help to find bounded contexts, and why are swimlanes a weak guide? Important
Answer
Answer: Pivotal events (few events that many care about) mark seams: different people and vocabulary on each side. Swimlanes follow departments, which are not the same as language and model boundaries.
7 — List four things a facilitator does and three they must not do. Important
Answer
Answer: Does: asks questions, writes hot spots, manages energy, checks in and out, gives feedback on group behaviour. Must not: model for the group, answer content questions, resolve conflicts outside the picked problem, take sides.
8 — Which outputs go to the Bounded Context Canvas, and which go to the backlog? Important
Answer
Answer: Context candidates, their events and language go to the Canvas; opportunities and commands become backlog items; hot spots become owned questions or ADRs.
9 — Map each sticky colour to a code artifact in Go or Laravel. Good to know
Answer
Answer: Event: struct or readonly class; command: struct plus handler; aggregate: type with invariants; policy: idempotent listener; read model: projection plus table; external system: port and adapter; hot spot: owned issue.
10 — Why must a policy be idempotent? Must-know
Answer
Answer: Delivery between contexts is at least once, so the same event can arrive twice; the second delivery must not release the order or charge the card again.
11 — What changes when you run it remotely? Important
Answer
Answer: Smaller groups, shorter sessions with breaks, a prepared board with a pinned legend, two facilitators, and the knowledge that Big Picture works worse online.
12 — Name three common failures and their fixes. Important
Answer
Answer: Too few experts: postpone and invite by question. Developers modelling: ask them to write events only. No follow-up: owners and dates for hot spots, a one-page summary the next week.
Glossary
| Term | Meaning |
|---|---|
| Event Storming | A collaborative workshop that explores a domain with stickies on a timeline, invented by Alberto Brandolini |
| Big Picture | The first flavour: the whole line of business, 10 to 30+ people |
| Process Modelling | The second flavour: one process with commands, policies and read models |
| Software Design (design level) | The third flavour: aggregates and events of one bounded context |
| Domain event | A past-tense fact relevant to the domain experts, orange |
| Command (action) | An imperative intent from an actor or policy, blue |
| Actor (agent) | A person, team or role around events and commands, small yellow |
| Aggregate | The part that receives commands, decides and keeps invariants, large pale yellow |
| Constraint | DDD-crew's business-facing name for the large pale yellow sticky |
| Policy | A reaction: "whenever X then Y", lilac, automatic or manual |
| Read model (query model) | The information an actor needs to decide, green |
| External system | A deployable system outside the model, wide pink |
| Hot spot | A tilted pink note for conflicts, questions and objections |
| Opportunity | A positive counterpart of a hot spot, green |
| Value | Red and green marks showing where value is made or lost |
| UI mockup | A sketch of a screen placed next to the command or read model |
| Pivotal event | One of the few events many people care about; marks boundaries |
| Swimlane | A horizontal strip per actor or department on the roll |
| Chaotic exploration | Everyone writes events alone, unordered |
| Enforce the timeline | Discuss, merge and order events left to right |
| Reverse narrative | Telling the story backwards to find missing events |
| Parking lot | A place for off-topic items so the session continues |
| Phone a friend | Asking an absent expert for an answer during the session |
| Facilitator | The neutral person who runs the workshop but does not model |
| Check-in / check-out | Opening and closing rounds where everyone speaks once |
| Paper roll | The long writable surface that makes the modelling space unlimited |
| Emerging bounded context | A context candidate that appears from the wall, not drawn up front |
| Bounded Context Canvas | A one-page description of a context (purpose, language, events, dependencies) |
| Event catalogue | A list of events with context, cause, decider and reactors |
| Projection | A read model built by folding events, idempotent and rebuildable |
| Outbox | A table written in the same transaction as the aggregate, relayed to the broker |
| DDD-crew | An open community that publishes the glossary and cheat sheet |
| Miro / Mural | Online whiteboards used for remote sessions |
References
- Alberto Brandolini, Introducing Event Storming, Ziobrando's Lair, 18 November 2013: "EventStorming is a workshop format for quickly exploring complex business domains."; the aggregate "is the portion of the system that receives commands and decides whether to execute them or not, thus producing a domain event"; materials list; bonus targets. Saved:
scratchpad/sources/event-storming/ziobrando-intro.htmlandziobrando-intro.txt - Alberto Brandolini, eventstorming.com (styles), Book, Patterns ("Precision is a legitimate aspiration. But too much precision, too early, can get in a way of a good exploratory conversation."), Resources ("Online delivery isn't a good fit for Big Picture."). Saved:
eventstorming-home.html,book.html,patterns.html,resources.html(plus.txt) - Alberto Brandolini, Introducing EventStorming (Leanpub, work in progress): table of contents with the Big Picture phases, patterns and anti-patterns. Saved:
leanpub.html - DDD-crew, EventStorming Glossary & Cheat sheet (CC BY 4.0): colours, definitions of domain event, hotspot, policy, command, query model, constraint, pivotal events, facilitator rules, steps. Saved:
ddd-crew-cheatsheet.md - Miro, Event Storming template (four stages, template by Judith Birmoser). Saved:
miro.html - Laravel 13, Events (
ShouldDispatchAfterCommit) and Query Builder (upsert,insertOrIgnore). Saved:laravel-events.html,laravel-queries.html - Vaughn Vernon, Domain-Driven Design Distilled (2016) and Vlad Khononov, Learning Domain-Driven Design (2021): background reading, not fetched, nothing quoted
- Judith Birmoser's Event Storming articles: not fetched; her Miro template page above was read instead