Feature Pack 5

Enabling interim fix JR44015

Interim fix JR44015 provides fixes and enhancements to the WebSphere Commerce integration with Sterling Order Management Solution. This fix applies only to environments that use the WebSphere Commerce Enterprise Service Bus as a mediator.

The following fixes and enhancements are included:
  • One order item can reserve inventory from multiple fulfillment centers
  • If a guest shopper submits a payment, completes an order, and then registers and logs on in the same session, WebSphere Commerce can merge the order to the registered shopper's account.
  • Performance improvements:
    • Code was modified to reduce potential deadlock issues
    • Improves the performance of the findInventory method
To enable the enhancements, you need to change configurations on your WebSphere Commerce machine and on the WebSphere Commerce Enterprise Service Bus.

Before you begin

Install the cumulative interim fix for Feature Pack 5, JR53048.fep.

Procedure

On the WebSphere Commerce machine, complete the following steps:
  1. Stop the WebSphere Commerce server (server1).
  2. If the interim fix was installed before you enable features, then complete the following steps to enable the interim fix. If the interim fix is installed after you enabled features, skip this step:
    1. Open the following file,
      • WC_eardir/xml/config/wc-server.xml
      • WebSphere Commerce Developerworkspace_dir/WC/xml/config/wc-server.xml
    2. Enable the four event listeners,
      • Set config/Components/component[@compClassName="com.ibm.commerce.order.event.UserEntriesMigrationrEventForOrdeListener"]/@enable to true.
      • Set config/Components/component[@compClassName="com.ibm.commerce.order.event.UserRegistrationEventForOrderListener"]/@enable to true.
      • Set config/Components/component[@compClassName="com.ibm.commerce.order.event.CreateOrderOnSuccessEventListener"]/@enable to true.
      • Set config/Components/component[@compClassName="com.ibm.commerce.order.event.ChangeExternalOrdersEventListener"]/@enable to true.
      Note: To delete the interim fix, set the four event listeners to false and execute the following SQL statements:
      DELETE FROM CMDREG WHERE
            INTERFACENAME='com.ibm.commerce.security.commands.GetUserEntriesToBeMigratedCmd';     
      DELETE FROM CMDREG WHERE
            INTERFACENAME='com.ibm.commerce.event.commands.RaiseWCSEventCmd';  
      DELETE FROM CMDREG WHERE
            INTERFACENAME='com.ibm.commerce.orderitems.commands.SetOrderItemInformationCmd';
      UPDATE CMDREG SET
            CLASSNAME='com.ibm.commerce.order.facade.server.commands.ComposeInventoryRequirementCmdImpl'
            WHERE
            INTERFACENAME='com.ibm.commerce.order.facade.server.commands.ComposeOrderCmd+IBM_Inventory';      
  3. If the interim fix was installed after you enable features, then complete the following steps to enable the interim fix:
    1. Execute the following SQL to update CMDREG:
      INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
      (0,'com.ibm.commerce.security.commands.GetUserEntriesToBeMigratedCmd',
      	'com.ibm.commerce.security.commands.GetUserEntriesToBeMigratedCmdImpl','Local');  
         
      INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
      (0,'com.ibm.commerce.event.commands.RaiseWCSEventCmd','com.ibm.commerce.event.commands.RaiseWCSEventCmdImpl','Local'); 
      
      INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET) VALUES
      (0,'com.ibm.commerce.orderitems.commands.SetOrderItemInformationCmd',
      	'com.ibm.commerce.integration.sterling.oms.commands.SterlingOMSSetOrderItemShippingOffsetCmdImpl','Local');   
        
      UPDATE CMDREG SET
      CLASSNAME='com.ibm.commerce.inventory.facade.server.commands.ComposeDOMInventoryRequirementCmdImpl'
      WHERE
      INTERFACENAME='com.ibm.commerce.order.facade.server.commands.ComposeOrderCmd+IBM_Inventory';
    2. Register the four event listeners by adding them to the config/Components element in wc-server.xml file that you previously opened:
      <component compClassName="com.ibm.commerce.order.event.UserEntriesMigrationrEventForOrdeListener"
      	enable="true" name="UserEntriesMigrationrEventForOrdeListener">
      	<property display="false">
      		<start enabled="true"/>
      	</property>
      </component>
      
      <component compClassName="com.ibm.commerce.order.event.UserRegistrationEventForOrderListener"
      	enable="true" name="UserRegistrationEventForOrderListener">
      	<property display="false">
      		<start enabled="true"/>
      	</property>
      </component>
      
      <component compClassName="com.ibm.commerce.order.event.CreateOrderOnSuccessEventListener"
      	enable="true" name="CreateOrderOnSuccessEventListener">
      	<property display="false">
      		<start enabled="true"/>
      	</property>
      </component>
      
      <component compClassName="com.ibm.commerce.order.event.ChangeExternalOrdersEventListener"
      	enable="true" name="ChangeExternalOrdersEventListener">
      	<property display="false">
      		<start enabled="true"/>
      	</property>
      </component>
      Note: To delete the interim fix, set the four event listeners to false and execute the following SQL statements:
      DELETE FROM CMDREG WHERE
            INTERFACENAME='com.ibm.commerce.security.commands.GetUserEntriesToBeMigratedCmd';     
      DELETE FROM CMDREG WHERE
            INTERFACENAME='com.ibm.commerce.event.commands.RaiseWCSEventCmd';  
      DELETE FROM CMDREG WHERE
            INTERFACENAME='com.ibm.commerce.orderitems.commands.SetOrderItemInformationCmd';
      UPDATE CMDREG SET
            CLASSNAME='com.ibm.commerce.order.facade.server.commands.ComposeInventoryRequirementCmdImpl'
            WHERE
            INTERFACENAME='com.ibm.commerce.order.facade.server.commands.ComposeOrderCmd+IBM_Inventory';      
In the WebSphere Enterprise Service Bus, complete the following steps:
  1. Copy files and establish the ChangeOrder mediation flow to the mediation module in WebSphere Integration Developer (WID). The workspace directory of your mediation module in WID is represented as WID_Workspace_DIR.
    Note: Ensure that you back up your original files before you overwrite the following files:
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/GetInvAvlMultiApiCorrelationContextType.xsd to WID_Workspace_DIR/WCToSSFSMediationModule/GetInvAvlMultiApiCorrelationContextType.xsd
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/CommonAttributesMapping_WCUOM_To_SCUOM.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/CommonAttributesMapping_WCUOM_To_SCUOM.xsl
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/GetInventoryAvailabilityToCorrelationContext.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/GetInventoryAvailabilityToCorrelationContext.xsl
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/GetInventoryAvailabilityToMultiApiHTTPInput.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/GetInventoryAvailabilityToMultiApiHTTPInput.xsl
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/MultiApiOutputToShowInventoryAvailability.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/MultiApiOutputToShowInventoryAvailability.xsl
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/CreateOrderOnSuccessToChangeOrder.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/CreateOrderOnSuccessToChangeOrder.xsl
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/ReserveAvailableInventoryOutputToAcknowledgeInventoryRequirement.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/ReserveAvailableInventoryOutputToAcknowledgeInventoryRequirement.xsl
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/ProcessInventoryRequirementToReserveAvailableInventoryHTTPInput.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/ProcessInventoryRequirementToReserveAvailableInventoryHTTPInput.xsl
    • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/ProcessInventoryRequirementToMultiApiHTTPInput.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/ProcessInventoryRequirementToMultiApiHTTPInput.xsl
    If you customized any files, reapply your customizations after you copy the files to the new directory.
  2. Establish the mediation flow of ChangeOrder.
    1. Copy the following files to your workspace in WebSphere Integration Developer:
      • Copy file from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/ChangeOrderToMultiAPIInput.map to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/ChangeOrderToMultiAPIInput.map
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/ChangeOrderToMultiAPIInput.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/ChangeOrderToMultiAPIInput.xsl
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/MultiAPIInChangeOrderWESBFailToRespondOrder.map to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/MultiAPIInChangeOrderWESBFailToRespondOrder.map
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/MultiAPIInChangeOrderWESBFailToRespondOrder.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/MultiAPIInChangeOrderWESBFailToRespondOrder.xsl
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/MultiAPIOutputErrorInChangeOrderToRespondOrder.map to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/MultiAPIOutputErrorInChangeOrderToRespondOrder.map
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/MultiAPIOutputErrorInChangeOrderToRespondOrder.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/MultiAPIOutputErrorInChangeOrderToRespondOrder.xsl
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/MultiAPIOutputInChangeOrderToRespondOrder.map to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/MultiAPIOutputInChangeOrderToRespondOrder.map
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/MultiAPIOutputInChangeOrderToRespondOrder.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/MultiAPIOutputInChangeOrderToRespondOrder.xsl
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/ChangeOrderToMultiAPIInput.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/ChangeOrderToMultiAPIInput.xsl
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/xslt/custom/MultiAPIOutputInChangeOrderToRespondOrder.xsl to WID_Workspace_DIR/WCToSSFSMediationModule/xslt/custom/MultiAPIOutputInChangeOrderToRespondOrder.xsl
      If you customized any files, reapply your customizations after you copy the files to the new directory.
    2. If you did not customize the default Feature Pack 5 mediation module, then copy the following files to your workspace in WebSphere Integration Developer. Ensure that you back up the original files before you proceed.
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/WCToSSFSMediationModule.medflow to WID_Workspace_DIR/WCToSSFSMediationModule/WCToSSFSMediationModule.medflow
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/WCToSSFSMediationModule.mfc to WID_Workspace_DIR/WCToSSFSMediationModule/WCToSSFSMediationModule.mfc
      • Copy from WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule/WCToSSFSMediationModule.mfcex to WID_Workspace_DIR/WCToSSFSMediationModule/WCToSSFSMediationModule.mfcex
    3. If you customized the default Feature Pack 5 mediation module, you need to manually establish the ChangeOrder mediation flow upon your customized mediation module in WebSphere Integration Developer (WID).
      1. Refer to the mediation module that is delivered in this interim fix to establish the changeOrder flow in your own customized mediation module.

        To refer to the changeOrder flow that is delivered in this fix, open WebSphere Integration Developer and import the mediation module under WC_installdir/components/sterling-integration/wid/WCToSSFSMediationModule and the needed projects ('CWYFF_FlatFile' and 'websphere_default_messaging_provider').

        Wait until the build is finished and successful. In the Business integration view of WebSphere Integration Developer, open the WCToSSFSMediationModule overview (WCToSSFSMediationModule > Integration Logic > Mediation Flows > WCToSSFSMediationModule), check the flow between ChangeOrder in OrderServicesPortType and multiAPI in SSFSHttpPostInterfacePartner. Establish the same flow into your own customized mediation module. Pay attention to the properties of each node and keep the same properties for each node.

      2. Attach mapping files for each XSL transformation node:

        Select the XSL transformation node ChangeOrderToMultiAPIInput, in the Details tab of properties, attach the mapping file. Click Browse, input "ChangeOrderToMultiAPIInput" in the filter text box and select WCToSSFSMediationModule/xslt/ChangeOrderToMultiAPIInput.map.

        Select the XSL transformation node MultiAPIInChangeOrderWESBFailToRespondOrder, in the Details tab of properties, attach the mapping file. Click Browse, input "MultiAPIInChangeOrderWESBFailToRespondOrder" in the filter text box and select WCToSSFSMediationModule/xslt/MultiAPIInChangeOrderWESBFailToRespondOrder.map.

        Select the XSL transformation node MultiAPIOutputErrorInChangeOrderToRespondOrder, in the Details tab of properties, attach the mapping file. Click Browse, input "MultiAPIOutputErrorInChangeOrderToRespondOrder" in the filter text box and select WCToSSFSMediationModule/xslt/MultiAPIOutputErrorInChangeOrderToRespondOrder.map.

        Select the XSL transformation node MultiAPIOutputInChangeOrderToRespondOrder, in the Details tab of properties, attach the mapping file. Click Browse, input "MultiAPIOutputInChangeOrderToRespondOrder" in the filter text box and select WCToSSFSMediationModule/xslt/MultiAPIOutputInChangeOrderToRespondOrder.map.

      3. Save all the changes.
      4. Build the project and export the EAR file.
      5. Uninstall the EAR in WebSphere Enterprise Service Bus and install the new EAR file.
  3. For the Sterling Order Management side, update the template for CreateOrderOnSuccess.
  4. Stop the Sterling integration service and stop the Sterling server.
  5. Backup Sterling_eardir/resources.jar.
  6. Open the original template Sterling_eardir/resources.jar/global/template/event/ORDER_CREATE.ON_SUCCESS.xml file.
  7. Add the following attribute.
    BuyerUserId=""
  8. Start servers and services: Start the WebSphere Commerce server, WebSphere Enterprise Service Bus server, Sterling server, and the Sterling integration service.