Open johanhaleby opened 2 years ago
Other scenarios
saga.initializedOn<GameCreated> thenWaitFor<PlayerJoinedGame, PlayerJoinedGame, FirstPlayerMadeMove>(atMost(10, MINUTES)) do { (gameCreated, playerJoinedGame1, playerJoinedGame2, firstPlayerMadeMove) ->
emailService.send(..)
} ifNotFulfilled { listOfAllReceivedEventsThusFar ->
...
}
E.g.
Resulting events from
Game.close(gameCreated.gameId)
is stored using the AS. A subscription is automatically created onGameCreated
andPlayerJoinedGame
. Saga state could be stored in a stream in an event store, which is why we pass that in as a parameter to SagaDSL.