S++Business systems language
DEMO SOURCE · SPP / APP / PHYRead the book

product.app

product/product.app

Download original file · Petstore source contents

1domain product;23application productService {4    environment testing {5        deploy product;6        quantum {7            system: UNIFIED_STORE;8            resource: shopLedger;9        }10    }11}1213header requestContext {14    unique String globalSerialNumber;15    String callerId;16    String requestSerialNumber;17    String callMode;18    String callOrigin;19}2021header responseContext {22    String status(Default = "OK");23}2425i18n {26    defaultLocale "en-US";27    supportedLocales "en-US", "zh-CN";28}2930tables entities {31    table PRODUCT_FACTS(Product) {32        primarykey(Product.productCode);33    }34}3536map PRODUCT_FACTS {37    description = String(200) description;38}3940tables roles {41    table PRODUCT_CATALOGUE(CatalogProduct) {42        primarykey(CatalogProduct.sku);43    }44}4546scope {47    local(in requestContext, out responseContext) {48        repository(argument(0, CatalogProduct.active), CatalogProduct[]) using shopRecords listCatalogue;49    }50}5152web {53    start initializeProductDomain;54    expose reviseProduct;55}