The ModifyOrder message extends the CommerceMessage class and adds the following properties:

The ModifyOrder message allows external sources to request changes to the order object. The list of modifications is included in the message’s modifications array. The recipient of the ModifyOrder message is responsible for determining whether a modification is possible given the flow of control and the ownership of the objects for which the modification is requested.

After attempting to perform the modification, Oracle ATG Web Commerce sends a ModifyOrderNotification referencing the modifications that were requested and indicating whether the modification was successful or not. If a component receives a ModifyOrder message for an object to which the component does not have access, the request is forwarded on to other configured systems with access rights to the objects to be modified.

In Commerce, systems only listen for, and work on, one type of Modification in the ModifyOrder message. By default, the modification listened for is the one requesting a cancellation of an order. This type is implemented in the OrderFulfillerModificationHandler and the HardgoodFulfillerModificationHandler, both of which extend the ModificationHandler class. These classes are designed to deal with ModifyOrder and ModifyOrderNotification messages.

The ModifyOrder message is received by the OrderFulfiller. The OrderFulfiller checks that none of the shipping groups have been shipped by examining their states. If any of the shipping groups have been shipped then a ModifyOrderNotification message is sent with the requested modifications marked as failed. The sender of the original ModifyOrder message is responsible for listening for the ModifyOrderNotification.

The ModifyOrder message and its modification array are flexible enough to accommodate any changes to the order structure and its subcomponents. However, Commerce implements only the most basic cancel order features because of the variety of business rules that can apply for requested changes and the legality of certain changes.

The ModificationHandler class provides the flexibility to change the behavior in handling ModifyOrder and ModifyOrderNotification messages.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices