The HardgoodFulfillerModificationHandler
deals with the ModifyOrder
and ModifyOrderNotifications
messages received by the HardgoodFulfiller
. The HardgoodFulfiller
contains a ModificationHandler
property, which is set by default to the HardgoodFulfillerModificationHandler
. This class is similar to the OrderFulfillerModificationHandler
.
To change the handling behavior of ModifyOrder
and ModifyOrderNotification
messages, extend the HardgoodFulfillerModificationHandler
class and change the ModificationHandler
property HardgoodFulfiller
to point to the new class.
The default implementation deals with the following ModifyOrder
modification:
Remove the shipping group from the order:
The fulfillers can remove shipping groups if they have not been shipped. Determining whether a shipping group has been shipped can be difficult because of the asynchronous nature of shipping items. Consulting the states may not be enough to determine if the group has been shipped. Oracle ATG Web Commerce consults the state to make sure that it is not in a NO_PENDING_ACTION or REMOVED state. This is sufficient because in the default Commerce configuration, there is no integration with a real warehouse so shipment is indicated by changing a set of states in the order repository. Some vendors might decide to create business rules that limit the time in which cancellations can occur because it is difficult to determine the exact shipping time for a shipping group.
Ship the shipping group:
The
HardgoodFulfiller
can be notified that a shipping group has shipped through aModifyOrder
message (which is originally sent to theOrderFulfiller
, then forwarded to theHardgoodFulfiller
). TheHardgoodFulfiller
gets aGenericUpdate
modification through theModifyOrder
message, checks the current state of the shipping group to ensure that it is PENDING_SHIPMENT. If everything is fine, it sets the state to NO_PENDING_ACTION and notifies the rest of the system of the change with aModifyOrderNotification
message.
It also handles the following ModifyOrderNotification
modification:
Shipping group update:
A shipping group is re-processed when the method
processMultipleShippingGroups
inHardgoodFulfiller
is called. This method is called when a modification of type SHIPPING_GROUP_UPDATE is received. TheHardgoodFulfiller
does not listen on the topic over whichModifyOrderNotification
messages are sent. Instead, theOrderFulfufiller
listens on that topic and forwards the appropriate messages directly to theHardgoodFulfiller
using the port in defined inOrderFulfillmentTools.fulfillerPortNameMap
.