Monday, December 10, 2012

Basic Fulfillment Process : ATG

Basic Fulfillment Process:


Online shopping can be broken down into two major phases, the purchase process and the fulfillment process. The purchase process is everything that is done before checking out, while the fulfillment process begins after the checkout.

The transition from the purchase process to the fulfillment process occurs when the SubmitOrder message is sent out after a successful checkout. The successful delivery of this message signals the transfer of control and the beginning of the fulfillment process.

The SubmitOrder message is a JMS ObjectMessage that contains the serialized order object. The order is serialized so that fulfillment can be serviced by an entirely independent system.

Building the fulfillment system on top of JMS provides the flexibility of a distributed fulfillment system. For example, a site could contain products from various vendors that can be purchased through the same account. A large site might sell bikes from one vendor and books from another publisher. These orders would require different fulfillers because they would not be fulfilled from the same warehouse. The Purchase Process allows for multiple shipping groups and multiple payment methods. The Fulfillment Process then determines which shipping groups will be fulfilled by which fulfiller and forwards the requests to the relevant fulfillers.

The following list describes the control flow during the Order Fulfillment process.


    1.OrderFulfiller receives a SubmitOrder message containing a serialized copy of the order. The owner of the order object is the component that receives this message. By default, the OrderFulfiller receives this message.

    2.The OrderFulfiller passes control of the different components to the configured fulfillers using FulfillOrderFragments. In this example there is only one fulfiller, the HardgoodFulfiller.

      Note: The various fragments contain the shipping groups associated with the items in the fragment. All the shipping groups listed in the fragment are now controlled by the component receiving this message. In this example, the HardgoodFulfiller now controls the shipping groups.

    3.While the HardgoodFulfiller controls the shipping groups, all modifications to the shipping groups take place through the HardgoodFulfiller. It is important that no other component modifies these shipping groups while the HardgoodFulfiller controls the shipping groups. The HardgoodFulfiller could be running on a back-end system in a different environment. If other components need to make changes to the shipping groups, the ModifyOrder requests are forwarded to the HardgoodFulfiller. The HardgoodFulfiller is responsible for making the requested changes to the shipping groups while they are under its control.

      Note: All modifications are performed by fulfillers by calling pipeline chains. For more information, see the Processor Chains and the Pipeline Manager chapter.

    4.When the shipping groups are shipped, a ModifyOrderNotification message is sent. When this message is sent, the HardgoodFulfiller gives up control of the shipping groups within the order. Control is transferred back to the OrderFulfiller automatically if no one else has control until the complete fulfillment of the order. This follows the assumption in the pattern that the OrderFulfiller retains control until the order is complete.

    5.The OrderFulfiller receives the ModifyOrderNotification message. If the business rules allow payment to settle on first shipment, then the payment groups are charged with the cost of the items, shipment and taxes. Business rules can also specify that payment be settled upon the shipment of the last shipping group.

    6.After the order is settled, the OrderFulfiller changes its state to NO_PENDING_ACTION and no longer controls the order.

    







   
Note: The OrderFulfiller is the only class that has control over the payment groups and the only class that can modify the highest-level Order object.

The fulfillment system is designed to be a flexible implementation that is easily extensible. This flexibility allows for the different ways businesses handle their fulfillment. If the ATG Commerce order fulfillment system is not appropriate for a site, it is easy to remove the ATG Commerce order fulfillment framework. Remove the ATG Commerce order fulfillment framework by not running a fulfillment server and having another component listen for the SubmitOrder message. The SubmitOrder should contain all the information necessary for the vendor to start the fulfillment process.

No comments:

Popular Posts