Skip to content

Event Storming

Event Storming is a collaborative modeling technique that helps understand the dynamics of a complex domain. The diagram below shows the result of an Event Storming session for the Bartendie system.

Event Storming is a workshop-based method to quickly explore complex business domains. It focuses on:

  • Domain events (things that happen in the system)
  • Commands (user actions that trigger events)
  • Aggregates (business entities that maintain consistency)
  • Policies (business rules that react to events)
  • External systems and actors

The diagram below represents a comprehensive Event Storm for the Bartendie system:

graph TD
    %% Define the event flow
    
    %% Commands (blue)
    C1[/"Schedule Event"/]:::command
    C2[/"Define Event Theme"/]:::command
    C3[/"Create Menu"/]:::command
    C4[/"Check Inventory"/]:::command
    C5[/"Generate Shopping List"/]:::command
    C6[/"Purchase Supplies"/]:::command
    C7[/"Prepare Bar Setup"/]:::command
    C8[/"Create Batched Cocktails"/]:::command
    C9[/"Serve Drinks"/]:::command
    C10[/"Collect Guest Feedback"/]:::command
    C11[/"Update Inventory"/]:::command
    C12[/"Create Recipe"/]:::command
    C13[/"Update Recipe"/]:::command
    C14[/"Rate Recipe"/]:::command
    C15[/"Tag Recipe"/]:::command
    C16[/"Search Recipes"/]:::command
    C17[/"Add Recipe To Menu"/]:::command
    C18[/"Create Tag"/]:::command
    C19[/"Update Tag"/]:::command
    C20[/"Apply Tag"/]:::command
    C21[/"Remove Tag"/]:::command
    C22[/"Search By Tag"/]:::command
    C23[/"Create Guest List"/]:::command
    C24[/"Add Guest"/]:::command
    C25[/"Remove Guest"/]:::command
    C26[/"Track Guest RSVP"/]:::command
    C27[/"Set Guest Preferences"/]:::command
    C28[/"Set Attendance Estimate"/]:::command
    C29[/"Recalculate Shopping Quantities"/]:::command
    C30[/"Add Bar Tool"/]:::command
    C31[/"Update Bar Tool"/]:::command
    C32[/"Remove Bar Tool"/]:::command
    C33[/"Add Equipment"/]:::command
    C34[/"Update Equipment"/]:::command
    C35[/"Remove Equipment"/]:::command
    C36[/"Link Tools To Recipe"/]:::command
    C37[/"Check Tool Availability"/]:::command
    C38[/"Define Flavor Profile"/]:::command
    C39[/"Add Ingredient Profile"/]:::command
    C40[/"Update Ingredient Profile"/]:::command
    C41[/"Calculate Recipe Balance"/]:::command
    C42[/"Suggest Balancing Ingredients"/]:::command
    C43[/"Filter By Flavor Profile"/]:::command
    C44[/"Calculate Batch Quantities"/]:::command
    C45[/"Scale Recipe"/]:::command
    C46[/"Convert Units"/]:::command
    C47[/"Save Batch Recipe"/]:::command
    C48[/"Scan Product Barcode"/]:::command
    C49[/"Look Up Product Data"/]:::command
    C50[/"Add Product To Inventory"/]:::command
    C51[/"Update Product Level"/]:::command
    C52[/"Mark Product Empty"/]:::command
    C53[/"Add Product To Shopping List"/]:::command
    C54[/"Create Venue"/]:::command
    C55[/"Update Venue"/]:::command
    C56[/"Add Storage"/]:::command
    C57[/"Update Storage"/]:::command
    C58[/"Remove Storage"/]:::command
    C59[/"Add Bar"/]:::command
    C60[/"Update Bar"/]:::command
    C61[/"Remove Bar"/]:::command
    
    %% Domain Events (orange)
    E1{{EventScheduled}}:::event
    E2{{ThemeDefined}}:::event
    E3{{MenuCreated}}:::event
    E4{{InventoryChecked}}:::event
    E5{{ShoppingListGenerated}}:::event
    E6{{SuppliesPurchased}}:::event
    E7{{BarSetupCompleted}}:::event
    E8{{CocktailsBatched}}:::event
    E9{{DrinkServed}}:::event
    E10{{FeedbackCollected}}:::event
    E11{{InventoryUpdated}}:::event
    E12{{RecipeCreated}}:::event
    E13{{RecipeUpdated}}:::event
    E14{{RecipeRated}}:::event
    E15{{RecipeTagged}}:::event
    E16{{RecipesSearched}}:::event
    E17{{RecipeAddedToMenu}}:::event
    E18{{TagCreated}}:::event
    E19{{TagUpdated}}:::event
    E20{{TagApplied}}:::event
    E21{{TagRemoved}}:::event
    E22{{ItemsSearchedByTag}}:::event
    E23{{GuestListCreated}}:::event
    E24{{GuestAdded}}:::event
    E25{{GuestRemoved}}:::event
    E26{{GuestRSVPUpdated}}:::event
    E27{{GuestPreferencesSet}}:::event
    E28{{AttendanceEstimateSet}}:::event
    E29{{ShoppingQuantitiesRecalculated}}:::event
    E30{{BarToolAdded}}:::event
    E31{{BarToolUpdated}}:::event
    E32{{BarToolRemoved}}:::event
    E33{{EquipmentAdded}}:::event
    E34{{EquipmentUpdated}}:::event
    E35{{EquipmentRemoved}}:::event
    E36{{ToolsLinkedToRecipe}}:::event
    E37{{ToolAvailabilityChecked}}:::event
    E38{{ToolShortageIdentified}}:::event
    E39{{FlavorProfileDefined}}:::event
    E40{{IngredientProfileAdded}}:::event
    E41{{IngredientProfileUpdated}}:::event
    E42{{RecipeBalanceCalculated}}:::event
    E43{{BalancingSuggestionsGenerated}}:::event
    E44{{RecipesFilteredByProfile}}:::event
    E45{{MenuBalanceAnalyzed}}:::event
    E46{{BatchQuantitiesCalculated}}:::event
    E47{{RecipeScaled}}:::event
    E48{{UnitsConverted}}:::event
    E49{{BatchRecipeSaved}}:::event
    E50{{ProductBarcodeScanned}}:::event
    E51{{ProductDataRetrieved}}:::event
    E52{{ProductAddedToInventory}}:::event
    E53{{ProductLevelUpdated}}:::event
    E54{{ProductMarkedEmpty}}:::event
    E55{{ProductAddedToShoppingList}}:::event
    E56{{VenueCreated}}:::event
    E57{{VenueUpdated}}:::event
    E58{{StorageAdded}}:::event
    E59{{StorageUpdated}}:::event
    E60{{StorageRemoved}}:::event
    E61{{BarAdded}}:::event
    E62{{BarUpdated}}:::event
    E63{{BarRemoved}}:::event
    
    %% Policies (purple)
    P1{{"When EventScheduled then Define Theme"}}:::policy
    P2{{"When ThemeDefined then Create Menu"}}:::policy
    P3{{"When MenuCreated then Check Inventory"}}:::policy
    P4{{"When InventoryChecked and shortages then Generate Shopping List"}}:::policy
    P5{{"When SuppliesPurchased then Update Inventory"}}:::policy
    P6{{"When MenuCreated then Prepare Bar Setup"}}:::policy
    P7{{"When BarSetupCompleted then Create Batched Cocktails"}}:::policy
    P8{{"When ThemeDefined then Suggest Matching Recipes"}}:::policy
    P9{{"When RecipeAddedToMenu then Update Required Ingredients"}}:::policy
    P10{{"When EventCreated then Apply Related Tags"}}:::policy
    P11{{"When RecipeCreated then Suggest Related Tags"}}:::policy
    P12{{"When EventScheduled then Create Guest List"}}:::policy
    P13{{"When GuestAdded or GuestRemoved then Update Attendance Estimate"}}:::policy
    P14{{"When AttendanceEstimateSet then Recalculate Shopping Quantities"}}:::policy
    P15{{"When GuestPreferencesSet then Suggest Menu Additions"}}:::policy
    P16{{"When GuestRSVPUpdated then Update Attendance Estimate"}}:::policy
    P17{{"When MenuCreated then Check Tool Availability"}}:::policy
    P18{{"When RecipeAdded then Link Required Tools"}}:::policy
    P19{{"When ToolShortageIdentified then Add to Shopping List"}}:::policy
    P20{{"When BarSetupCompleted then Verify Tool Availability"}}:::policy
    P21{{"When RecipeIngredientAdded then Update Recipe Balance"}}:::policy
    P22{{"When RecipeCreated then Calculate Recipe Balance"}}:::policy
    P23{{"When RecipeBalanceCalculated and Unbalanced then Suggest Balancing Ingredients"}}:::policy
    P24{{"When MenuCreated then Analyze Menu Balance"}}:::policy
    P25{{"When GuestPreferencesSet then Filter By Matching Flavor Profiles"}}:::policy
    P26{{"When AttendanceEstimateSet then Calculate Batch Quantities"}}:::policy
    P27{{"When Recipe Scaled then Convert Units If Needed"}}:::policy
    P28{{"When Create Batched Cocktails then Calculate Batch Quantities"}}:::policy
    P29{{"When ProductBarcodeScanned then Look Up Product Data"}}:::policy
    P30{{"When ProductDataRetrieved then Add To Inventory"}}:::policy
    P31{{"When ProductMarkedEmpty then Add To Shopping List"}}:::policy
    P32{{"When ProductLevelLow then Add To Shopping List"}}:::policy
    
    %% Aggregates (yellow)
    A1[Event]:::aggregate
    A3[Menu]:::aggregate
    A4[Inventory]:::aggregate
    A5[ShoppingList]:::aggregate
    A6[BarSetup]:::aggregate
    A7[BatchedCocktail]:::aggregate
    A8[Guest]:::aggregate
    A9[Recipe]:::aggregate
    A12[Tag]:::aggregate
    A14[GuestList]:::aggregate
    A17[BarTool]:::aggregate
    A18[Equipment]:::aggregate
    A21[FlavorProfile]:::aggregate
    A22[Ingredient]:::aggregate
    A27[BatchRecipe]:::aggregate
    A30[Product]:::aggregate
    A31[Venue]:::aggregate
    
    %% External Systems (pink)
    S1[(Supplier)]:::system
    S2[(Email/Messaging)]:::system
    S3[(Product Database)]:::system
    S4[(Barcode Scanner)]:::system
    
    %% Actors (green)
    AC1((Host)):::actor
    AC2((Bartender)):::actor
    AC3((Guests)):::actor
    
    %% Key command flows - simplified for clarity
    AC1 -.-> C1
    C1 --> E1
    E1 -.-> P1
    P1 -.-> C2
    C2 --> E2
    E2 -.-> P2
    P2 -.-> C3
    C3 --> E3
    E3 -.-> P3
    P3 -.-> C4
    C4 --> E4
    E4 -.-> P4
    P4 -.-> C5
    C5 --> E5
    E5 --> A5
    A5 -.-> S1
    S1 -.-> C6
    C6 --> E6
    E6 -.-> P5
    P5 -.-> C11
    C11 --> E11
    E11 --> A4
    E3 -.-> P6
    P6 -.-> C7
    C7 --> E7
    E7 -.-> P7
    P7 -.-> C8
    C8 --> E8
    E8 --> A7
    AC2 -.-> C9
    C9 --> E9
    AC1 -.-> C10
    C10 --> E10
    AC1 -.-> C12
    C12 --> E12
    E12 --> A9

    %% Venue Management
    AC1 -.-> C54
    C54 --> E56
    E56 --> A31
    A31 -.-> C1
    A31 -.-> C7
    
    %% Styles
    classDef event fill:#FF9900,stroke:#333,stroke-width:1px;
    classDef command fill:#5D9CEC,stroke:#333,stroke-width:1px;
    classDef aggregate fill:#FFEB3B,stroke:#333,stroke-width:1px;
    classDef policy fill:#9C27B0,stroke:#333,stroke-width:1px,color:#fff;
    classDef system fill:#FF4081,stroke:#333,stroke-width:1px;
    classDef actor fill:#4CAF50,stroke:#333,stroke-width:1px,color:#fff,shape:circle;
    
    %% Legend
    subgraph Legend
        L1{{Domain Event}}:::event
        L2[/"Command"/]:::command
        L3[Aggregate]:::aggregate
        L4{{"Policy"}}:::policy
        L5[(External System)]:::system
        L6((Actor)):::actor
    end

Commands represent user actions or system operations that trigger events. Examples include:

  • Schedule Event: The act of creating a new event
  • Create Menu: Creating a drink menu for an event
  • Check Inventory: Checking current stock levels
  • Scan Product Barcode: Scanning a product to identify it

Events are facts that have happened in the system. They are named in past tense:

  • EventScheduled: An event has been scheduled
  • MenuCreated: A menu has been created
  • InventoryChecked: Inventory levels have been checked
  • ProductBarcodeScanned: A product barcode has been scanned

Aggregates are clusters of domain objects that are treated as a single unit:

  • Event: The event being planned
  • Menu: The drink menu for an event
  • Inventory: The collection of products and ingredients
  • Recipe: A cocktail recipe

Policies represent business rules that react to events and trigger commands:

  • When EventScheduled then Define Theme: After scheduling an event, a theme should be defined
  • When MenuCreated then Check Inventory: After creating a menu, inventory should be checked
  • When ProductMarkedEmpty then Add To Shopping List: When a product is marked empty, add it to the shopping list

Systems outside of Bartendie that interact with it:

  • Supplier: For ordering supplies
  • Email/Messaging: For communicating with guests
  • Product Database: For looking up product information
  • Barcode Scanner: For scanning product barcodes

People who interact with the system:

  • Host: Plans events and manages inventory
  • Bartender: Prepares and serves drinks
  • Guests: Attend events and provide preferences

The diagram shows several key workflows:

  1. Event Planning Flow:

    • Host schedules an event
    • System prompts to define a theme
    • System creates a menu
    • System checks inventory and generates shopping list
  2. Inventory Management Flow:

    • Product is scanned
    • System looks up product data
    • Product is added to inventory
    • When levels are low, product is added to shopping list
  3. Bar Setup Flow:

    • Menu is created
    • System checks tool availability
    • Bar setup is prepared
    • Cocktails are batched for the event
  4. Guest Management Flow:

    • Guest list is created
    • Guests are added with preferences
    • Attendance estimate is updated
    • Shopping quantities are recalculated
  5. Bar Management Flow:

    • Venue is created
    • Bars are added to the venue with names and descriptions
    • Bar features are defined (e.g., “Full Service”, “Wine Bar”)
    • Bars can be updated or removed as needed
    • Bar setups reference specific bars within venues

Event Storming helps identify the key workflows and interactions in the system, making it easier to design the software architecture and identify potential issues or opportunities for improvement.

  • Domain Model: See the structural representation of these aggregates and entities
  • Command Flow: Detailed implementation view of these command flows
  • Context Map: Understand how these workflows span bounded contexts
  • Business Rules: Review the rules that govern these workflows