Testing the new function by mocking the Sterling Order Management message

You can integrate Sterling Order Management with HCL Commerce, by deploying the customized code.

About this task

The customized code you created in the previous steps needs to be deployed to a product server, and communicate with Sterling Order Management through the Service Definition Framework.

You can also hard code the Sterling Order Management API to check if whether the end-to-end flow is working properly.

Note: How to customize the Sterling Order Management API and UI to have real support of the additional parameter to the GetEntitledPrice engine, is out of the scope of this example. For more information, see the Sterling Order Management Information Center.

To integrate Sterling Order Management with HCL Commerce:

Procedure

  1. Deploy the WebSphereCommerceServerExtensionsLogic project and com.ibm.commerce.price-ext to a product server. For more information about how to deploy the project to a product server, go to the HCL Commerce Information Center and search for Customized HCL Commerce Enterprise Application (EAR) assets.
  2. Restart the runtime server.
  3. Insert the hard-coded class into the Sterling Order Management server.
    Note: The Service Definition Framework and HCL Commerce product server was already configured in the Customizing the Service Definition Framework to transform the request message from Sterling Order Management to HCL Commerce tutorial. Now the customized configuration is ready on HCL Commerce and the Service Definition Framework.
  4. Insert the modified Sterling Order Management API into the Sterling Order Management server.
    1. To install the sample code, you must patch the ypmbe.jar ($YFS_RT/jar/smcfs/9.2.0/ypmbe.jar). The file to update in the ypmbe.jar is com/yantra/ypm/business/ue/impl/YPMGetItemPriceUEWCIntegrationImpl.class. The YPMGetItemPriceUEWCIntegrationImpl.class is attached: YPMGetItemPriceUEWCIntegrationImpl.zip.

      When the ypmbe.jar is updated, rebuild the EAR and redeploy the EAR into HCL Commerce.

    2. Go to <INSTALL_DIR>/bin, where <INSTALL_DIR> is the location where Sterling Order Management is installed. For example, opt/Sterling/Foundation/bin.
    3. Run ./buildear.sh -Dappserver=websphere -Dearfile=smcfs.ear -Dsupportmultiwar=false -Dwarfiles=smcfs,sma,sbc -Dnowebservice=true -Ddevmode=true create-ear.
    4. Open the WAS Admin Console>Applications>WebSphere Enterprise Applications.
    5. Click the Sterling Application. Click Update.
    6. Click Replace the entire application. Click Remote file system. Browse to the smcfs.ear that you created in step 1.
    7. Click Next. Accept all defaults to update the application.
    8. Restart server1. Restart service.
      Note: The sample code is hard-coded to add 40 as the value for the ValuePoints attribute for each LineItem in the getItemPrice request. An example message sent from the Service Definition Framework from Sterling Order Management:
      <Se:smo ...>
      ...
      	<body xsi:type="ex:getItemPriceRequestMsg">
      		<input:ItemPrice Currency="USD" EnterpriseCode="AuroraBase"
      IsQuantityTierRequested="N" OrganizationCodej="AuroraBase">
      		<LineItems>
      			<LineItem ItemID="FULO-0101" LineID="1" Quantity="1"
      UnitOfMeasure="EACH" ValuePoints="40"/>
      		</LineItems>
      		</input:ItemPrice>
      	</body>
      </Se:smo>
    9. Start Sterling Call Center. Search FULO-0101. You can find that the price is 40 times more than the original one, unless you also applied an additional price rule.