Introduction
Order processing can be broken down into two major steps-
1. Order capture
2. Order transfer
Order capture through OrderProcessCmdImpl
PFB the sequence of activities performed for order capturing-
processOrders() -> processOrderComments() -> OrderCommentRecordContrlCmd
-> processOrderChannelId() -> order.BuschnId
-> processPIAdd(ibPerformPIAdd=true) -> PIAddCmd, ValidatePaymentMethodCmd
-> callProcessOrder(isUBFEnabled()) -> BusinessFlowUrlEventCmd -> PreProcessOrderCmdImpl -> validateOrderState
-> validateContract() -> CheckCatalogEntryEntitlementCmd
-> validateShippingAddress()
-> allocateInventory() -> DoInventoryActionCmd
-> checkorder() -> CheckOrderCmd
-> CheckOrderAcceptanceCmd
-> updateBillingAddress() -> ValidateOrderAddressCmd
-> CheckPaymentTCsCmd
-> ProcessOrderCmdImpl
-> mergeShopperPayInfo
-> handleOrderFraud()
-> checkOrderAndItemTotals()
-> updateInventory()
-> getInitialAmount() throws exception if dInitialAmount.compareTo(dOrderTotal)
-> UpdateSpendingLimitCmd
-> handleRecurringOrder() -> ProcessRecurringOrderCmd
-> handleSubscription() -> ProcessSubscriptionCmd
-> raiseBusinessEvents() -> RaiseOrderEventCmd -> Order Submission Event other events order creation/item add/update/cancellation
-> RespondOrderBuildCmdImpl (From ChangeOrderBODSOI.xmlf)
-> OrderFacadeClient
2. Order Transfer
Order transfer can further be broken down into two major categories i.e. synchronous or asynchronous order transfer based upon the OrderSubmit event priority being set high or low inside wc-server.xml, PFB the sequence of activities performed-
1. When user submits an online order, 'OrderSubmit' event gets created and order status is marked with status 'M' at the point of time.
2. Generated event OrderSubmit is persisted inside BUSEVENT table with CHECKED column updated to 0 indicating that created OrderSubmit event is to be processed. At the same time ORDERS.TRANSFERSTATUS column is marked with '1' indicating order being in transferring status.
4. When the OOB scheduled RaiseECEvent scheduler job runs next time, it picks up the submitted OrderSubmit event from BUSEVENT table for processing, and updates the BUSEVENT.CHECKED to -10 indicating that the event has been processed by the schedule job so that the order is not processed again next time the scheduler runs.
5. OOB and scheduled RaiseECEvent job notifies the OrderSubmitEventListener configured inside wc-server.xml to process the event. OrderSubmitEventListener will in-turn call the ProcessOrderSubmitEventCmd for further processing. It builds up the request, process the order messages.
6. We can customize the flow at this point of time to take the order for further processing.
Order processing can be broken down into two major steps-
1. Order capture
2. Order transfer
Order capture through OrderProcessCmdImpl
PFB the sequence of activities performed for order capturing-
processOrders() -> processOrderComments() -> OrderCommentRecordContrlCmd
-> processOrderChannelId() -> order.BuschnId
-> processPIAdd(ibPerformPIAdd=true) -> PIAddCmd, ValidatePaymentMethodCmd
-> callProcessOrder(isUBFEnabled()) -> BusinessFlowUrlEventCmd -> PreProcessOrderCmdImpl -> validateOrderState
-> validateContract() -> CheckCatalogEntryEntitlementCmd
-> validateShippingAddress()
-> allocateInventory() -> DoInventoryActionCmd
-> checkorder() -> CheckOrderCmd
-> CheckOrderAcceptanceCmd
-> updateBillingAddress() -> ValidateOrderAddressCmd
-> CheckPaymentTCsCmd
-> ProcessOrderCmdImpl
-> mergeShopperPayInfo
-> handleOrderFraud()
-> checkOrderAndItemTotals()
-> updateInventory()
-> getInitialAmount() throws exception if dInitialAmount.compareTo(dOrderTotal)
-> UpdateSpendingLimitCmd
-> handleRecurringOrder() -> ProcessRecurringOrderCmd
-> handleSubscription() -> ProcessSubscriptionCmd
-> raiseBusinessEvents() -> RaiseOrderEventCmd -> Order Submission Event other events order creation/item add/update/cancellation
-> RespondOrderBuildCmdImpl (From ChangeOrderBODSOI.xmlf)
-> OrderFacadeClient
2. Order Transfer
Order transfer can further be broken down into two major categories i.e. synchronous or asynchronous order transfer based upon the OrderSubmit event priority being set high or low inside wc-server.xml, PFB the sequence of activities performed-
1. When user submits an online order, 'OrderSubmit' event gets created and order status is marked with status 'M' at the point of time.
2. Generated event OrderSubmit is persisted inside BUSEVENT table with CHECKED column updated to 0 indicating that created OrderSubmit event is to be processed. At the same time ORDERS.TRANSFERSTATUS column is marked with '1' indicating order being in transferring status.
4. When the OOB scheduled RaiseECEvent scheduler job runs next time, it picks up the submitted OrderSubmit event from BUSEVENT table for processing, and updates the BUSEVENT.CHECKED to -10 indicating that the event has been processed by the schedule job so that the order is not processed again next time the scheduler runs.
5. OOB and scheduled RaiseECEvent job notifies the OrderSubmitEventListener configured inside wc-server.xml to process the event. OrderSubmitEventListener will in-turn call the ProcessOrderSubmitEventCmd for further processing. It builds up the request, process the order messages.
6. We can customize the flow at this point of time to take the order for further processing.