PreProcessOrderCmd task command

The PreProcessOrderCmd task command preprocesses the order.

Task command

com.ibm.commerce.order.commands.PreProcessOrderCmd

Implementation class

com.ibm.commerce.order.commands.PreProcessOrderCmdImpl

Commands called

Possible callers

OrderProcessPreApprovalCmdImpl

ProcessOrderCmdImpl

Behavior

Validate the order states. If the order status is not within the list (P,I,E,W,N,B,H), throw an exception

Validate the contracts for all the order items in the order

Validate the shipping address for all order items. If addressId is null, throw an exception

Call DoInventoryActionCmd to allocate or backorder any order item that is not allocated or backordered yet

If the inventory action unlocks the order:
  • Call ReprepareOrderCmd to redo the calculation

Call CheckOrderAcceptanceCmd to verify that the contracts referenced by the order items of the order have an active status

Update billing address for the order and call ValidateOrderAddressCmd to verify address updated correctly

Call CheckPaymentTCsCmd to check account, spending limit and purchase order number