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

petshop-scene-removeCartItem.spp

petshop/cart/petshop-scene-removeCartItem.spp

Download original file · Petstore source contents

1domain petshop;23Scenario serial removeCartItem(Buyer, Cart, Goods, CartRemovalAgreement, CartLine[]) {4    checkBuyerCredential;5    checkGoodsCredential;6    initializeCartRemovalAgreement;7    findBuyer;8    identify(Buyer);9    locateBuyerCart;10    prepareCartRemovalAgreementReceipt;11    findCart;12    identify(Cart);13    checkCart;14    captureCartLines;15    removeCartProduct;16    transaction {17        deleteCartLine;18        insertCartLine(Cart.lines);19        updateCart;20        insertReceipt(CartRemovalAgreement.receipt);21    }22}