RIDDL Specification For improving.app
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

ClosedStoreHandler: Handler

ItemValue
BrieflyBrief description missing.
Definition PathImprovingApp.StoreContext.Store.CreatedStore.ClosedStoreHandler
View Source LinkStore.riddl(214:17)

OnMessageClause command CreateStore

Statements

\nerror "Store already created"\n

OnMessageClause command EditStoreInfo

Statements

\n"copy fields from info to Draft info fields""adjust meta fields to reflect the change""yield the StoreUpdated event"\n

OnMessageClause command MakeStoreReady

Statements

\nerror "Store must be in Draft state before being made Ready"\n

OnMessageClause command DeleteStore

Statements

\nset field CreatedStore.meta to "StoreContext.MetaInfo"send event StoreDeleted to outlet StoreEventsSource.Eventsmorph entity StoreContext.Store to state DeletedStore with record DeletedStoreData\n

OnMessageClause command OpenStore

Statements

\nset field CreatedStore.meta to "StoreContext.MetaInfo"send event StoreOpened to outlet StoreEventsSource.Eventsbecome entity StoreContext.Store to handler Store.CreatedStore.OpenStoreHandler\n

OnMessageClause command CloseStore

Statements

\nerror "Store is already closed."\n

OnMessageClause command AddProductsToStore

Statements

```\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*
* [OnMessageClause 'On command CloseStore'](/improvingapp/storecontext/store/createdstore/readystorehandler#on-command-closestore) in [Handler 'ReadyStoreHandler'](/improvingapp/storecontext/store/createdstore/readystorehandler)
* [OnMessageClause 'On command CloseStore'](/improvingapp/storecontext/store/createdstore/openstorehandler#on-command-closestore) in [Handler 'OpenStoreHandler'](/improvingapp/storecontext/store/createdstore/openstorehandler)

## *Uses Nothing*