基于Event Storming的专辑创建(关联未创建艺人)方案时序呈现正确性及方法咨询
Hey there! Let's break down how to map your Album-Artist creation flow with Event Storming step by step, focusing on your chosen Solution 2. I'll walk you through the timeline in the right order so you can visualize it clearly.
Event Storming Timeline for Solution 2: Create Album + Auto-Create Missing Artist
1. Start with the User's Initial Action
- Command:
CreateAlbum(initiated by a user/admin, includes all album details plus the artist's name/info)- This is your starting line—someone wants to add a new album, and they’ve provided the artist’s details alongside the album’s metadata (like title, release date, genre).
2. System Checks for Existing Artist
- Domain Event:
ArtistExistenceChecked- The system runs a quick lookup: does this artist already exist in our database?
- Decision Point: For Solution 2, the result here is ArtistNotFound (this is the key branching trigger that sets the auto-creation flow in motion).
3. System Auto-Creates the Missing Artist
- Command:
CreateArtist(system-generated, using the artist info pulled directly from the originalCreateAlbumrequest) - Domain Event:
ArtistCreated- The system generates a unique ID for the new artist, saves their details to the database, and this event confirms the artist now exists.
4. System Links Album to the New Artist
- Command:
LinkArtistToAlbum(system-generated, uses the new artist ID + the original album details) - Domain Event:
AlbumCreatedWithAssociatedArtist- The album is finally created, and its record is tied to the newly minted artist ID. Now both entities exist with a valid association.
5. User Gets Confirmation
- Domain Event:
AlbumCreationConfirmed- The user receives a success message: "Your album has been created, and we’ve added the associated artist to our database."
Key Tips for Correct Timeline Flow
Event Storming lives and dies by chronological order—here’s how to make sure you’re doing it right:
- Always start with the user’s original command (that’s the spark that starts everything).
- Follow each action with its outcome (commands trigger events, events lead to new commands if needed).
- Highlight decision points (like
ArtistNotFound) to make the branching logic obvious—this helps anyone reading the board understand why the auto-creation step happens.
Board Visualization Quick Tips
If you’re using a physical/digital Event Storming board:
- Lay out sticky notes left-to-right in timeline order.
- Use color coding to differentiate types: e.g., blue for commands, green for domain events, yellow for user/admin actors.
- Add a small sticky note for the
ArtistNotFounddecision point betweenArtistExistenceCheckedandCreateArtistto make the flow explicit.
内容的提问来源于stack exchange,提问作者Ngọc Nguyễn
相关产品推荐
相关产品推荐

