Last active
June 30, 2020 00:19
-
-
Save andremw/c12c37e68e28b21a427804b0c84d9c24 to your computer and use it in GitHub Desktop.
DutchBlitz with F# and DDD - improved workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bounded Context: Dutch Blitz game | |
Workflow: "Join Game" | |
Triggered by: | |
"Join Game" command | |
Primary input: | |
A join request | |
Output events: | |
"Player joined game" event | |
Side-effects: | |
An acknowledgment is sent to the person | |
// step 1 | |
do CheckGameAvailability | |
If game does not exist then: | |
Do not allow person to continue | |
stop | |
If game has started then: | |
Do not allow person to join | |
stop | |
If game is full then: | |
Do not allow person to join | |
stop | |
// step 2 | |
do AddPersonToGame | |
// step 3 | |
do SendAknowledgementToPerson | |
// step 4 | |
return PlayerJoinedGame event (if no errors) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment