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

CreatedProductHandler: Handler

ItemValue
BrieflyBrief description missing.
Definition PathImprovingApp.ProductContext.Product.DraftProductState.CreatedProductHandler
View Source Linkproduct.riddl(78:15)

OnMessageClause command ProductContext.CreateProduct

Statements

\nerror "Product already created."\n

OnMessageClause command UpdateProductInfo

Statements

\n"Copy fields that are provided from UpdateProductInfo.info into DefinedProductState.info fields""adjust meta fields to reflect the change set""yield ProductInfoUpdated event with new info"\n

OnMessageClause command DeleteProduct

Statements

\nset field DraftProductState.meta to "ProductContext.ProductMetaInfo"send event ProductDeleted to outlet ProductEventsSource.Eventsmorph entity ProductContext.Product to state DeletedProductState with record DeletedProduct\n

OnMessageClause command ActivateProduct

Statements

{
  "return a list of non-filled in fields"
} else {
  //"all required fields are present"

  set field DraftProductState.meta to "ProductContext.ProductMetaInfo"
  send event ProductActivated to outlet ProductEventsSource
  morph entity Product to state DefinedProductState with record DefinedProduct
}
```\n
### _OnMessageClause command InactivateProduct_

#### Statements
```\nerror "cannot inactivate a draft product"```\n
### _OnMessageClause query GetProductInfo_

#### Statements
```\n"yield ProductInfoResult message"```\n
## *Used By None*

## *Uses Nothing*