-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Domain Modeling - Design Workflow: turn start #86
Comments
Commandtype TurnStartCommand = {
playerId: string;
} Eventtype TurnStartEvent = {
playerId: string;
} Errortype TurnStartError = EventSourceWriteError Typetype TurnStart = (eventsource: EventSource, command: TurnStartCommand) => ResultAsync<TurnStartEvent, TurnStartError> Workflowworkflow: turn start
input:
event source
turn start command
output:
async result of
ok -> turn start event
err -> turn start error
step:
append event to event source
if error occured:
return event source write error
otherwise:
return turn start event |
@JohnsonMao
every workflow just need to consider itself, validation could be separated out and integrate by composition. |
ok~ |
@JohnsonMao |
Another thing I just wonder, why |
I apologize for the misunderstanding. |
implement design of https://hackmd.io/KvV2Ou3HS9uN11OUpsAUzA?both#Workflow-turn-start
The text was updated successfully, but these errors were encountered: