CreatedProductHandler: Handler
Item | Value |
---|---|
Briefly | Brief description missing. |
Definition Path | ImprovingApp.ProductContext.Product.DraftProductState.CreatedProductHandler |
View Source Link | product.riddl(78:15) |
\nerror "Product already created."
\n
\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
\nset field DraftProductState.meta to "ProductContext.ProductMetaInfo"send event ProductDeleted to outlet ProductEventsSource.Eventsmorph entity ProductContext.Product to state DeletedProductState with record DeletedProduct
\n
{
"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*