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

DraftStoreHandler: Handler

ItemValue
BrieflyBrief description missing.
Definition PathImprovingApp.StoreContext.Store.DraftStore.DraftStoreHandler
View Source LinkStore.riddl(80:15)

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 DeleteStore

Statements

\n"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 DeletedStoreData\n

OnMessageClause command MakeStoreReady

Statements

\n"yield the StoreIsReady event"morph entity StoreContext.Store to state CreatedStore with record CreatedStoreData\n

OnMessageClause command OpenStore

Statements

\nerror "store must be moved to the Ready state. All required attributes must be provided."\n

OnMessageClause command CloseStore

Statements

```\n
### _OnMessageClause command AddProductsToStore_

#### Statements
```\n"add provided products to store definition""and adjust meta fields to reflect the change""yield the ProductsAddedToStore event"//TODO: Add cases where there is invalid product
```\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
## *Used By None*

## *Uses Nothing*