Skip to content
Event storming templates

Event Storm — Rail Ticketing and Delay Repay

Retailing, fulfilment and delay repay contexts for a train operator, with a compensation policy triggered by a journey completed late, a journey search written up as a command and a refund event nobody produces.

Template previewEvent storming
Rail ticketing — purchase to delay repayBounded contexts3Domain events7Event coverage85.7%Hotspots3Model smells2Domain eventCommandActorAggregatePolicyRead modelExternal systemHotspotRetailing1 event · 2 commands · 1 policy · 1 hotspotBasketFulfilment2 events · 2 commands · 1 policy · 1 hotspotTicketDelay repay4 events · 3 commands · 1 policy · 1 hotspotClaimClaimPassengerSearch journeysFares andavailabilityPassengerBuy ticketTicket purchasedRail Delivery Groupfares feedSplit ticketing — dowe sell the cheapercombination?When ticketpurchased, issuebarcodeTicketing serviceIssue barcodeBarcode issuedGateline systemValidate at gatelineTicket usedTicket walletSmartcard back officeTicket used on atrain that was latercancelledWhen ticket used,record journeyJourney serviceRecord journeyJourney completedlateDarwin real-time feedWhen journeycompleted late, offercompensationClaims serviceOffer compensationCompensation offeredClaims assessorAssess disputed claimClaim upheldRefund settledClaim status trackerWho pays when thedelay was caused byanother operator?Workshop checksEvents with no producing command1Refund settledCommands with no resulting event1Search journeysCommands with no aggregate0noneAggregates with no events0nonePolicies with a missing trigger event0nonePolicies with a missing command0noneHotspots per context3Retailing 1 · Fulfilment 1 · Delay repay 1Cross-context flows2Retailing → Fulfilment · Fulfilment → Delay repay

Make it your own.

title "Rail ticketing — purchase to delay repay"

context "Retailing"
  actor Passenger
  aggregate Basket
  command "Search journeys" by Passenger on Basket
  readmodel "Fares and availability"
  command "Buy ticket" by Passenger on Basket emits "Ticket purchased"
  event "Ticket purchased"
  external "Rail Delivery Group fares feed"
  hotspot "Split ticketing — do we sell the cheaper combination?"
  policy "When ticket purchased, issue barcode" then "Issue barcode"

context "Fulfilment"
  aggregate Ticket
  command "Issue barcode" by "Ticketing service" on Ticket
  event "Barcode issued" from "Issue barcode"
  command "Validate at gateline" by "Gateline system" on Ticket
  event "Ticket used" from "Validate at gateline"
  readmodel "Ticket wallet"
  external "Smartcard back office"
  hotspot "Ticket used on a train that was later cancelled"
  policy "When ticket used, record journey" then "Record journey"

context "Delay repay"
  actor "Claims assessor"
  aggregate Claim
  command "Record journey" by "Journey service" on Claim
  event "Journey completed late" from "Record journey"
  external "Darwin real-time feed"
  policy "When journey completed late, offer compensation" then "Offer compensation"
  command "Offer compensation" by "Claims service" on Claim
  event "Compensation offered" from "Offer compensation"
  command "Assess disputed claim" by "Claims assessor" on Claim emits "Claim upheld"
  event "Claim upheld"
  event "Refund settled"
  readmodel "Claim status tracker"
  hotspot "Who pays when the delay was caused by another operator?"