ReadyStoreHandler: Handler
Item | Value |
---|---|
Briefly | Brief description missing. |
Definition Path | ImprovingApp.StoreContext.Store.CreatedStore.ReadyStoreHandler |
View Source Link | Store.riddl(126:15) |
\nerror "Store already created"
\n
\n"copy fields from info to Draft info fields""adjust meta fields to reflect the change""yield the StoreUpdated event"
\n
\nerror "Store must be closed before deleting it"
\n
\nerror "Store must be in Draft state before being made Ready"
\n
\nset field Store.CreatedStore.meta to "StoreContext.MetaInfo"send event StoreOpened to outlet StoreEventsSource.Eventsbecome entity StoreContext.Store to handler StoreContext.Store.CreatedStore.OpenStoreHandler
\n
\n"ensure all orders associated with store are Delivered or Cancelled before closing store"set field CreatedStore.meta to "StoreContext.MetaInfo"send event StoreClosed to outlet StoreEventsSource.Eventsbecome entity StoreContext.Store to handler StoreContext.Store.CreatedStore.ClosedStoreHandler
\n
```\n
### _OnMessageClause command RemoveProductsFromStore_
#### Statements
```\n"remove provided products from store""adjust meta fields to reflect the change""yield the ProductsRemovedFromStore event"//TODO: Add case where product to be removed doesn't exist in store
```\n
### _OnMessageClause command TerminateStore_
#### Statements
```\nset field CreatedStore.meta to "StoreContext.MetaInfo"morph entity StoreContext.Store to state TerminatedStore with record TerminatedStoreData//(lastMeta = @CreatedStoreState.meta)
```\n
## *Used By None*
## *Uses Nothing*