Skip to main content

Domain Stories (PlantUML)

This page demonstrates a Domain Story rendered via PlantUML using the DomainStory-PlantUML macro library:

Domain Storytelling can be a useful bridge between conceptual domain models and more technical UML design models.

DomainStory-PlantUML syntax (reference)

The official macro-based notation can be used in two ways:

  • portable (works with public kroki.io): !include <DomainStory/domainStory>
  • local include (works with local Docker Kroki include path): !include domainStory.puml
@startuml
!include <DomainStory/domainStory>

!$Story_Layout = "left-to-right"
Person(Customer, "Customer")
System(TicketMachine, "Ticket Machine")
activity(1, Customer, selects, Info: Movie, at, TicketMachine)
@enduml

Example: Story flow (rendered in this test site)

This uses the actual DomainStory-PlantUML macros (not a plain sequence diagram), so the result visually matches the Domain Story style with icons and activity notation.

Domain Story: Party

PlantUML source for "Domain Story: Party"
@startuml
!include <DomainStory/domainStory>

!$Story_Layout = "left-to-right"
Person(Alice, "Alice")
Person(Bob, "Bob")
activity(1, Alice, talks about the, Info: weather, with, Bob)
@enduml

Domain Story with Alice and Bob. Activity 1 shows Alice talking about the weather with Bob.

Note: this local include requires Kroki with include path support (e.g. the provided Docker setup with docker-compose.kroki.yml).

Why this matters

  • Domain Stories are often easier to validate with non-technical stakeholders.
  • Work objects (ticket, payment, request, etc.) become explicit in the model.
  • The flow can be validated early, before committing to technical class/method design details.

Example: Reis boeken (as-is)

Onderstaande EGN-export is opgenomen als visuele referentie:

Reis boeken as-is domain story

En hieronder een PlantUML-achtige variant in deze testsite, zodat je dezelfde flow in text-as-code kunt onderhouden en reviewen:

Domain Story: Reis boeken (as-is)

PlantUML broncode voor "Domain Story: Reis boeken (as-is)"
@startuml
!include <DomainStory/domainStory>
!$Story_Layout = "top-to-bottom"
scale 1.35

Person(Reiziger, "Reiziger", "", "", "", "1.4")
System(Site, "Triptop Site", "", "", "", "1.4")
Person(Medewerker, "Medewerker", "", "", "", "1.4")
System(Intern, "Intern Systeem", "", "", "", "1.4")

activity(1, Reiziger, bekijkt, Info: reisvoorbeeelden, op, Site)
activity(2, Reiziger, vult, Document: reisaanvraag, in, Site)
activity(3, Site, stuurt, Document: reisaanvraag, naar, Medewerker)
activity(4, Medewerker, stuurt, Info: reisvoorstel, naar, Reiziger)
activity(5, Reiziger, stuurt, Info: wijzigingen, naar, Medewerker)
activity(6, Reiziger, geeft, Info: reisbevestiging, aan, Medewerker)
activity(7, Medewerker, Maakt, Info: Boeking, _, Intern)
activity(8, Medewerker, genereert, Info: reis, voor, Reiziger)
@enduml
Domeinverhaal met 8 activiteiten. Activiteiten: 1. Reiziger bekijkt reisvoorbeeelden op Triptop Site. 2. Reiziger vult reisaanvraag in Triptop Site. 3. Triptop Site stuurt reisaanvraag naar Medewerker. 4. Medewerker stuurt reisvoorstel naar Reiziger. 5. Reiziger stuurt wijzigingen naar Medewerker. 6. Reiziger geeft reisbevestiging aan Medewerker. 7. Medewerker Maakt Boeking Intern Systeem. 8. Medewerker genereert reis voor Reiziger.