Deprecated feature: Transfer order
The TransferOrder outbound service interface is used to transfer an order to an external system.
Request
A request to this outbound service interface is in the form of a ProcessOrder
business object document (BOD) with action code Transfer. The definition of the
ProcessOrder BOD can be found in the XML schema file
workspace_dir/WebServicesRouter/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ProcessOrder.xsd.
The Service DataObject (SDO) interface of the ProcessOrder BOD is
com.ibm.commerce.order.datatypes.ProcessOrderType.
Response
The response to a successful request is in the form of an AcknowledgeOrder BOD
with no response criteria. The XML schema of the ProcessOrder BOD can be found in
the XML schema file
workspace_dir/WC/WebServicesRouter.war/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/AcknowledgeOrder.xsd.
The Service DataObject (SDO) interface of the AcknowledgeOrder BOD is
com.ibm.commerce.order.datatypes.AcknowledgeOrderType.
Message type
This outbound service interface
is mapped to the message type com.ibm.commerce.order.TransferOrder,
or com.ibm.commerce.order if the former is not defined.
Client task command
This outbound service
interface can be started by calling the order client task command
com.ibm.commerce.order.client.commands.ProcessOrderCmd with
action TransferOrder. Its default implementation,
com.ibm.commerce.order.client.commands.ProcessOrderCmdImpl ,
behaves as follows:
- It first calls the protected method
composeProcessOrder()to compose aProcessOrderSDO from the order ID or order access bean specified. - It then passes the action and the
ProcessOrderSDO to the order client facade implementation to make the outbound service request.
Usage scenario
- When an order is submitted by either a shopper or customer service
representative (CSR), the command
com.ibm.commerce.order.commands.ProcessOrderCmdImplis called. - Towards the end of its execution, the default implementation,
com.ibm.commerce.order.commands.ProcessOrderCmdImplraises the eventOrderSubmit. - The order submit event listener, which listens to the event, calls
the command
com.ibm.commerce.order.event.ProcessOrderSubmitEventCmd. - The SOI-specific implementation of this command,
com.ibm.commerce.soi.commands.SOIProcessOrderSubmitEventCmdImpl, calls the order client task commandcom.ibm.commerce.order.client.commands.ProcessOrderCmdwith actionTransferOrderto transfer the order to the external system. - Alternatively, the order component can be configured such that
the command
com.ibm.commerce.order.event.ProcessOrderSubmitEventCmdis called when the eventPaymentAuthorizationCompleteis raised so that the order is not transferred until payment has been authorized.- Open the HCL Commerce Configuration file.
- Disable the OrderSubmit Event and enable the Payment Authorization Complete
Event as shown in the following example:
<component compClassName="com.ibm.commerce.event.impl.ECEventEnableComponent" enable="false" name="OrderSubmit Event"> <property display="false"> <event name="OrderSubmit"/> </property> </component> <component compClassName="com.ibm.commerce.event.impl.ECEventEnableComponent" enable="true" name="Payment Authorization Complete Event"> <property display="false"> <event name="PaymentAuthorizationComplete"/> </property> </component>
- In
workspace_dir/WC/xml/config/com.ibm.commerce.order/wc-admin-component.xml,
configure the event on which you want the order transfer to occur. The event can be
PaymentAuthorizationCompleteorOrderSubmit. The default event isOrderSubmit. For example,<_config:configgrouping name="TransferOrder"> <_config:property name="accessProfile" value="IBM_TransferOrder"/> <_config:property name="event" value="PaymentAuthorizationComplete"/> </_config:configgrouping>