diff --git a/src/main/riddl/Events/eventReservationProjections.riddl b/src/main/riddl/Events/eventReservationProjections.riddl index e2f996ad..0957b334 100644 --- a/src/main/riddl/Events/eventReservationProjections.riddl +++ b/src/main/riddl/Events/eventReservationProjections.riddl @@ -1,5 +1,3 @@ -include "../Venues/Locations/location" - query GetLocationForEvent is { event: EventId } result LocationForEvent is { event: EventId, location: Venues.LocationId } result EventNotFound is { ??? } diff --git a/src/main/riddl/Gateway/ReservationGateway/reservationStories.riddl b/src/main/riddl/Gateway/ReservationGateway/reservationStories.riddl index 6be17c98..542a061f 100644 --- a/src/main/riddl/Gateway/ReservationGateway/reservationStories.riddl +++ b/src/main/riddl/Gateway/ReservationGateway/reservationStories.riddl @@ -4,37 +4,23 @@ epic CreateReservation { //"Create a new Reservation without booking it" case HappyPath is { - //interaction is { - // step from user Member "provides a ReservationId" to user App - // briefly "initial invocation", - // step from user App send command Reservation.CreateReservation to user GatewayAPI - // briefly "send creation message", - // step from user GatewayAPI "Create Reservation" to entity ImprovingApp.ReservationContext.Reservations - // briefly "create reservation", - // step from entity ImprovingApp.ReservationContext.Reservations "ReservationCreated" to pipe ImprovingApp.ReservationContext.ReservationEvents - // briefly "reservation created" - // step from pipe ImprovingApp.ReservationContext.ReservationEvents "ReservationCreated" to user App - //} - //example Success is { - // when Member provides CreateReservation command w/ necessary info to App - // then App sends CreateReservation message to GatewayAPI - // and GatewayAPI forwards message to ReservationContext - // and Reservation is booked - // and ReservationCreated message is returned from ReservationContext to GatewayAPI - // and GatewayAPI forwards message to App - // and App displays success notification to Member - } + step from user Member "provides a ReservationId" to user App + briefly "initial invocation" + step send command Reservation.CreateReservation from application App to context GatewayAPI + briefly "send creation message" + step from user GatewayAPI "Create Reservation" to entity ImprovingApp.ReservationContext.Reservations + briefly "create reservation" + step from entity ImprovingApp.ReservationContext.Reservations "ReservationCreated" to source ImprovingApp.ReservationContext.ReservationEvents + briefly "reservation created" + step from source ImprovingApp.ReservationContext.ReservationEvents "ReservationCreated" to application App } } briefly "A story about creating a reservation in Improving.app" described as "This is the story of how a reservation comes into existence" //Reservation Gateway Stories epic BookReservation is { - As user Member wants to "Book a Reservation" so that "I can book my Reservations in ImprovingApp" - author Alex is { - name: "Alex Weinstein" - email: "alex.weinstin@improving.com" - } + user Member wants to "Book a Reservation" so that "I can book my Reservations in ImprovingApp" + by author Alex //"Book a new Reservation by picking from a list, given time parameters" case TimePickHappyPath is { //interaction is { diff --git a/src/main/riddl/KalixStudy.conf b/src/main/riddl/KalixStudy.conf index 1c765fb2..59cf5f15 100644 --- a/src/main/riddl/KalixStudy.conf +++ b/src/main/riddl/KalixStudy.conf @@ -14,6 +14,7 @@ common = { hide-style-warnings = true debug = false show-unused-warnings = false + group-messages-by-kind = true } # This block provides options for the "hugo" command to translate riddl to a hugo web site. diff --git a/src/main/riddl/LocationsReservationsProjections/locationsReservationsProjections.riddl b/src/main/riddl/LocationsReservationsProjections/locationsReservationsProjections.riddl index 3f24a3a6..330d982d 100644 --- a/src/main/riddl/LocationsReservationsProjections/locationsReservationsProjections.riddl +++ b/src/main/riddl/LocationsReservationsProjections/locationsReservationsProjections.riddl @@ -1,5 +1,3 @@ -include "../Venues/Locations/location" - query ScheduleEasyEvent is { maxAttendance: Integer, event: EventInfo, diff --git a/src/main/riddl/Store/Store.riddl b/src/main/riddl/Store/Store.riddl index 7a7b31f8..0c7b1914 100644 --- a/src/main/riddl/Store/Store.riddl +++ b/src/main/riddl/Store/Store.riddl @@ -186,39 +186,13 @@ context StoreContext is { } on command OpenStore { set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta.createdOn, -// createdBy = @CreatedStoreState.meta.createdBy, -// lastUpdated = now(), -// lastUpdatedBy = @OpenStore.openingMember, -// currentState = @StoreStates.Open -// ) send event StoreOpened to outlet StoreEvents.Events - // ( - // storeId = @CreatedStoreState.id, - // info = @CreatedStoreState.info, - // meta = @CreatedStoreState.meta - // ) - become entity Store to handler OpenStoreHandler } on command CloseStore { "ensure all orders associated with store are Delivered or Cancelled before closing store" set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta, -// createdBy = @CreatedStoreState.meta, -// lastUpdated = now(), -// lastUpdatedBy = @CloseStore.closingMember, -// currentState = @StoreStates.Closed -// ) send event StoreClosed to outlet StoreEvents.Events -// ( -// storeId = @CreatedStoreState.id, -// info = @CreatedStoreState.info, -// meta = @CreatedStoreState.meta -// ) - become entity Store to handler ClosedStoreHandler } on command AddProductsToStore { @@ -235,13 +209,6 @@ context StoreContext is { } on command TerminateStore { set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta.createdOn, -// createdBy = @CreatedStoreState.meta.createdBy, -// lastUpdatedOn = now(), -// lastUpdatedBy = @TerminateStore.terminatingMember, -// currentState = @CreatedStoreState.meta -// ) morph entity Store to state TerminatedStore with record TerminatedStoreState // (lastMeta = @CreatedStoreState.meta) } @@ -268,20 +235,7 @@ context StoreContext is { on command CloseStore { "ensure all orders associated with store are Delivered or Cancelled before closing store" set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta.createdOn, -// createdBy = @CreatedStoreState.meta.createdBy, -// lastUpdated = now(), -// lastUpdatedBy = @CloseStore.closingMember, -// currentState = @StoreStates.Closed -// ) send event StoreClosed to outlet StoreEvents.Events -// ( -// storeId = @CreatedStoreState.id, -// info = @CreatedStoreState.info, -// meta = @CreatedStoreState.meta -// ) - become entity Store to handler ClosedStoreHandler } on command AddProductsToStore { @@ -298,13 +252,6 @@ context StoreContext is { } on command TerminateStore { set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta.createdOn, -// createdBy = @CreatedStoreState.meta.createdBy, -// lastUpdatedOn = now(), -// lastUpdatedBy = @TerminateStore.terminatingMember, -// currentState = @CreatedStoreState.meta -// ) morph entity Store to state TerminatedStore with record TerminatedStoreState // (lastMeta = @CreatedStoreState.meta) } @@ -324,46 +271,12 @@ context StoreContext is { } on command DeleteStore { set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta.createdOn, -// createdBy = @CreatedStoreState.meta.createdBy, -// lastUpdated = now(), -// lastUpdatedBy = @DeleteStore.deletingMember, -// currentState = @StoreStates.Deleted -// ) send event StoreDeleted to outlet StoreEvents.Events -// ( -// storeId = @CreatedStoreState.id, -// info = @CreatedStoreState.info, -// meta = @CreatedStoreState.meta -// ) - morph entity Store to state DeletedStore with record DeletedStoreState -// ( -// storeName = @CreatedStoreState.info.storeName, -// event = @CreatedStoreState.info.event, -// venue = @CreatedStoreState.info.venue, -// location = @CreatedStoreState.info.location, -// sponsoringOrg = @CreatedStoreState.info.sponsoringOrg, -// meta = @CreatedStoreState.meta -// ) } on command OpenStore { set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta.createdOn, -// createdBy = @CreatedStoreState.meta.createdBy, -// lastUpdated = now(), -// lastUpdatedBy = @OpenStore.openingMember, -// currentState = @StoreStates.Open -// ) send event StoreOpened to outlet StoreEvents.Events -// ( -// storeId = @CreatedStoreState.id, -// info = @CreatedStoreState.info, -// meta = @CreatedStoreState.meta -// ) - become entity Store to handler OpenStoreHandler } on command CloseStore { @@ -383,13 +296,6 @@ context StoreContext is { } on command TerminateStore { set field CreatedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @CreatedStoreState.meta.createdOn, -// createdBy = @CreatedStoreState.meta.createdBy, -// lastUpdatedOn = now(), -// lastUpdatedBy = @TerminateStore.terminatingMember, -// currentState = @CreatedStoreState.meta -// ) morph entity Store to state TerminatedStore with record TerminatedStoreState // (lastMeta = @CreatedStoreState.meta) } @@ -408,13 +314,6 @@ context StoreContext is { handler DeletedStoreHandler is { on command TerminateStore { set field DeletedStoreState.meta to "StoreContext.MetaInfo" -// ( -// createdOn = @DeletedStoreState.meta.createdOn, -// createdBy = @DeletedStoreState.meta.createdBy, -// lastUpdatedOn = now(), -// lastUpdatedBy = @TerminateStore.terminatingMember, -// currentState = @DeletedStoreState.meta -// ) morph entity Store to state TerminatedStore with record TerminatedStoreState // (lastMeta = @DeletedStoreState.meta) } diff --git a/src/main/riddl/Tenant/tenant.riddl b/src/main/riddl/Tenant/tenant.riddl index dc76c5ef..bdf09820 100644 --- a/src/main/riddl/Tenant/tenant.riddl +++ b/src/main/riddl/Tenant/tenant.riddl @@ -8,7 +8,7 @@ context TenantContext is { include "tenantSources" entity Tenant is { - option event-sourced + option event-sourced option available handler TenantHandler is {