Monday, January 27, 2014

Order Management Sub System - Order Processing - Part 1



When ever we submit order, There are several action WC considers to complete the submission.
  1.  Order Process command is triggered.
  2. If BusinessFlowEventListener component is enabled in ws-server-*.xml, unified business function will be called.
  3. Flow type is OrderProcess . ProcessOrderCmdImpl task command is called.
In BusinessFlowEventListener
  • Execute OrderProcessPreApprovalCmd, which invokes PreProcessOrderCmd
  • Execute OrderProcessCheckApprovalCmd to check whether approval is required
  • Execute OrderProcessPostApprovalCmd, which invokes ProcessOrderCmd
         4.  ProcessOrder command will do inventory check , payment finalization, tax calculation to complete the order.

    Note:

    If your store does not require approval of the order, You do not require Business Flow. Set BusinessFlowEventListener to false in ws-server.xml. This will call processOrderCmd Directly.