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

petshop-scene-setCartQuantity.spp

petshop/cart/petshop-scene-setCartQuantity.spp

Download original file · Petstore source contents

1domain petshop;23Scenario serial setCartQuantity(Buyer, Cart, Goods, CartQuantityAgreement, CartLine[]) {4    checkBuyerCredential;5    checkGoodsCredential;6    initializeCartQuantityAgreement;7    checkCartQuantityAgreementInput;8    parallel {9        findBuyer;10        findGoods;11    }12    identify(Buyer);13    identify(Goods);14    checkGoodsSale;15    locateBuyerCart;16    prepareCartQuantityAgreementReceipt;17    findCart;18    identify(Cart);19    checkCart;20    captureCartLines;21    setCartProductQuantity;22    transaction {23        deleteCartLine;24        insertCartLine(Cart.lines);25        updateCart;26        insertReceipt(CartQuantityAgreement.receipt);27    }28}