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

petshop-scene-clearShopCart.spp

petshop/cart/petshop-scene-clearShopCart.spp

Download original file · Petstore source contents

1domain petshop;23Scenario serial clearShopCart(Buyer, Cart, CartClearingAgreement, CartLine[]) {4    checkBuyerCredential;5    initializeCartClearingAgreement;6    findBuyer;7    identify(Buyer);8    locateBuyerCart;9    prepareCartClearingAgreementReceipt;10    findCart;11    identify(Cart);12    checkCart;13    captureCartLines;14    clearCartProducts;15    transaction {16        deleteCartLine;17        insertCartLine(Cart.lines);18        updateCart;19        insertReceipt(CartClearingAgreement.Receipt);20    }21}