petshop-scene-shipShopOrder.spp
petshop/fulfillment/petshop-scene-shipShopOrder.spp
Download original file · Petstore source contents
1domain petshop;23Scenario serial shipShopOrder(Buyer, StockLine[], ShopOrder, ShipmentAgreement) {4checkBuyerCredential;5initializeShipmentAgreement;6checkShipmentAgreementInput;78parallel {9findBuyer;10findShopOrder;11}12identify(buyer);13identify(shopOrder);14checkOrderOwner;15prepareOrderInventory;16findStockLine;17identify(stockLines);18checkShipmentEligibility;19checkReservedInventory;20prepareShipment;21prepareShipmentAgreementReceipt;22transaction {23shipInventory bounds {24stockLines.reserved: [0, null];25stockLines.sold: [0, null];26};27updateShopOrder;2829insertReceipt(shipmentAgreement.receipt);30}31}