diff --git a/src/main/riddl/ImprovingApp.conf b/src/main/riddl/ImprovingApp.conf index 2351961c..4a9f180c 100644 --- a/src/main/riddl/ImprovingApp.conf +++ b/src/main/riddl/ImprovingApp.conf @@ -5,11 +5,15 @@ command = hugo # This block provides options that are common to any command. common = { + show-times = true show-include-times = true verbose = false quiet = false dry-run = false - hide-warnings = true + show-warnings = true + show-missing-warnings = false + show-style-warnings = false + show-usage-warnings = false debug = false group-by-message-kind = true } diff --git a/src/main/riddl/Members/members.riddl b/src/main/riddl/Members/members.riddl index eb287960..acc04ca5 100644 --- a/src/main/riddl/Members/members.riddl +++ b/src/main/riddl/Members/members.riddl @@ -259,8 +259,8 @@ context MemberContext is { } } on command EditMemberInfo { - set field DraftMemberState.info to "MemberContext.EditableInfo" - set field DraftMemberState.meta to "MemberContext.MetaInfo" + set field Member.DraftMemberState.info to "MemberContext.EditableInfo" + set field Member.DraftMemberState.meta to "MemberContext.MetaInfo" send event MemberInfoEdited to outlet ImprovingApp.MemberContext.MemberEvents.Events } // For GetMemberData, eventually probably only admins and self should be able to make this call. Also diff --git a/src/main/riddl/Product/product.riddl b/src/main/riddl/Product/product.riddl index cceec3f7..5d3ab4c5 100644 --- a/src/main/riddl/Product/product.riddl +++ b/src/main/riddl/Product/product.riddl @@ -145,7 +145,7 @@ context ProductContext is { on command ProductContext.InactivateProduct { set field DefinedProductState.meta to "ProductContext.ProductMetaInfo" send event ProductInactivated to outlet ProductEvents.Events - become entity ProductContext.Product to handler ProductContext.Product.InactiveProductState.InactiveProductHandler + become entity ProductContext.Product to handler Product.DefinedProductState.InactiveProductHandler } on query GetProductInfo{ "yield ProductInfoResult message" @@ -168,7 +168,7 @@ context ProductContext is { on command ProductContext.ActivateProduct{ set field DefinedProductState.meta to "ProductContext.ProductMetaInfo" send event ProductActivated to outlet ProductEvents.Events - become entity ProductContext.Product to handler ProductContext.Product.ActiveProductHandler + become entity ProductContext.Product to handler Product.DefinedProductState.ActiveProductHandler } on command ProductContext.InactivateProduct{ error "Product is already Inactive" diff --git a/src/main/riddl/Store/Store.riddl b/src/main/riddl/Store/Store.riddl index 716ee1f8..d2cd0157 100644 --- a/src/main/riddl/Store/Store.riddl +++ b/src/main/riddl/Store/Store.riddl @@ -78,19 +78,19 @@ context StoreContext is { on command CreateStore { send event StoreCreated to outlet StoreEvents.Events - morph entity StoreContext.Store to state StoreContext.Store.DraftStore with record DraftStoreState + morph entity StoreContext.Store to state Store.DraftStore with record Store.DraftStoreData } on other { error "Only the CreateStore command is allowed in the default state" } } - record DraftStoreState is { + record DraftStoreData is { id: StoreContext.StoreId, info: StoreContext.EditableInfo, meta: StoreContext.MetaInfo } - state DraftStore of DraftStoreState is { + state DraftStore of Store.DraftStoreData is { handler DraftStoreHandler is { on command CreateStore { error "Store already created" @@ -104,17 +104,17 @@ context StoreContext is { "remove all attributes not defined in the Deleted state" "adjust meta fields to reflect change" "yield the StoreDeleted event" - morph entity StoreContext.Store to state DeletedStore with record DeletedStoreState + morph entity StoreContext.Store to state DeletedStore with record DeletedStoreData } on command MakeStoreReady { "yield the StoreIsReady event" - morph entity StoreContext.Store to state CreatedStore with record CreatedStoreState + morph entity StoreContext.Store to state CreatedStore with record CreatedStoreData } on command OpenStore { error "store must be moved to the Ready state. All required attributes must be provided." } on command CloseStore { - error "A store in Draft state may not be closed" + error "A store in Draft state may not be closed" // FIXME: Really? Why not? } on command AddProductsToStore { "add provided products to store definition" @@ -131,12 +131,12 @@ context StoreContext is { } } - record CreatedStoreState is { + record CreatedStoreData is { id: StoreContext.StoreId, info: StoreContext.Info, meta: StoreContext.MetaInfo } - state CreatedStore of CreatedStoreState is { + state CreatedStore of CreatedStoreData is { handler ReadyStoreHandler is { on command CreateStore { error "Store already created" @@ -153,15 +153,15 @@ context StoreContext is { error "Store must be in Draft state before being made Ready" } on command OpenStore { - set field CreatedStoreState.meta to "StoreContext.MetaInfo" + set field Store.CreatedStore.meta to "StoreContext.MetaInfo" send event StoreOpened to outlet StoreEvents.Events - become entity StoreContext.Store to handler StoreContext.Store.CreatedStoreState.OpenStoreHandler + become entity StoreContext.Store to handler StoreContext.Store.CreatedStore.OpenStoreHandler } on command CloseStore { "ensure all orders associated with store are Delivered or Cancelled before closing store" - set field CreatedStoreState.meta to "StoreContext.MetaInfo" + set field CreatedStore.meta to "StoreContext.MetaInfo" send event StoreClosed to outlet StoreEvents.Events - become entity StoreContext.Store to handler StoreContext.Store.CreatedStoreState.ClosedStoreHandler + become entity StoreContext.Store to handler StoreContext.Store.CreatedStore.ClosedStoreHandler } on command AddProductsToStore { "add provided products to store definition" @@ -176,8 +176,8 @@ context StoreContext is { // TODO: Add case where product to be removed doesn't exist in store } on command TerminateStore { - set field CreatedStoreState.meta to "StoreContext.MetaInfo" - morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreState + set field CreatedStore.meta to "StoreContext.MetaInfo" + morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreData // (lastMeta = @CreatedStoreState.meta) } } @@ -202,9 +202,9 @@ 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" + set field CreatedStore.meta to "StoreContext.MetaInfo" send event StoreClosed to outlet StoreEvents.Events - become entity StoreContext.Store to handler StoreContext.ClosedStoreHandler + become entity StoreContext.Store to handler StoreContext.Store.CreatedStore.ClosedStoreHandler } on command AddProductsToStore { "add provided products to store definition" @@ -219,8 +219,8 @@ context StoreContext is { // TODO: Add case where product to be removed doesn't exist in store } on command TerminateStore { - set field CreatedStoreState.meta to "StoreContext.MetaInfo" - morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreState + set field CreatedStore.meta to "StoreContext.MetaInfo" + morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreData // (lastMeta = @CreatedStoreState.meta) } } @@ -238,14 +238,14 @@ context StoreContext is { error "Store must be in Draft state before being made Ready" } on command DeleteStore { - set field CreatedStoreState.meta to "StoreContext.MetaInfo" + set field CreatedStore.meta to "StoreContext.MetaInfo" send event StoreDeleted to outlet StoreEvents.Events - morph entity StoreContext.Store to state DeletedStore with record DeletedStoreState + morph entity StoreContext.Store to state DeletedStore with record DeletedStoreData } on command OpenStore { - set field CreatedStoreState.meta to "StoreContext.MetaInfo" + set field CreatedStore.meta to "StoreContext.MetaInfo" send event StoreOpened to outlet StoreEvents.Events - become entity StoreContext.Store to handler StoreContext.Store.CreatedStoreState.OpenStoreHandler + become entity StoreContext.Store to handler Store.CreatedStore.OpenStoreHandler } on command CloseStore { error "Store is already closed." @@ -263,14 +263,14 @@ context StoreContext is { // TODO: Add case where product to be removed doesn't exist in store } on command TerminateStore { - set field CreatedStoreState.meta to "StoreContext.MetaInfo" - morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreState + set field CreatedStore.meta to "StoreContext.MetaInfo" + morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreData // (lastMeta = @CreatedStoreState.meta) } } } - record DeletedStoreState is { + record DeletedStoreData is { storeName: String, event: EventId?, venue: VenueId, @@ -278,11 +278,11 @@ context StoreContext is { sponsoringOrg: OrganizationId, meta: StoreContext.MetaInfo } - state DeletedStore of DeletedStoreState is { + state DeletedStore of DeletedStoreData is { handler DeletedStoreHandler is { on command TerminateStore { - set field DeletedStoreState.meta to "StoreContext.MetaInfo" - morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreState + set field DeletedStore.meta to "StoreContext.MetaInfo" + morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreData // (lastMeta = @DeletedStoreState.meta) } on other { @@ -291,10 +291,10 @@ context StoreContext is { } } - record TerminatedStoreState is { + record TerminatedStoreData is { lastMeta: StoreContext.MetaInfo } - state TerminatedStore of TerminatedStoreState is { + state TerminatedStore of TerminatedStoreData is { handler TerminatedStoreHandler is { on other { error "No actions are permitted on a Terminated store"