Introduced in Feature Pack 2

Extending the Order facade client that initiates the creation of recurring order in the Subscription Manager

In this lesson, you extend the process action and the Order facade client commands. The updated facade client command accepts the new parameters from the Deprecated featureMadisons store front for the day-of-month schedule type. The process action command builds the parameters for the day-of-month schedule and starts the Subscription Manager facade client.

Procedure

  1. Copy ServiceProviderProcessRecurringOrderCmdExtImpl.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic.
    2. Right-click src. Select New > Package.
    3. Enter com.mycompany.commerce.order.commands as the Name of the package.
    4. Copy ServiceProviceProcessRecurringOrderCmdExtImpl.java from temp\src\com\mycompany\commerce\order\commands to the new package.
  2. Copy ServiceProviderOrderFacadeConstantsExt.java file:
    1. Right-click src. Select New > Package.
    2. Enter com.mycompany.commerce.order.facade as the Name of the package
    3. Copy ServiceProviderOrderFacadeConstantsExt.java from temp\src\com\mycompany\commerce\order\facade to the new package. This constants file is used in the client facade.
  3. Copy ServiceProviderOrderFacadeClientExt.java file:
    1. Right-click src. Select New > Package.
    2. Enter com.mycompany.commerce.order.facade.client as the Name of the package.
    3. Copy ServiceProviderOrderFacadeClientExt.java file from temp\src\com\mycompany\commerce\order\facade\client to the new package.
  4. Update the process action command implementation to use the following one in the CMDREG table:
    1. Connect to the development database.
    2. Enter the following command;

      Update cmdreg set classname='com.mycompany.commerce.order.commands.ServiceProviderProcessRecurringOrderCmdExtImpl' where interfacename='com.ibm.commerce.order.commands.ProcessRecurringOrderCmd';

  5. Update the struts configuration file for the order service to use the new facade client.
    1. In the Enterprise Explorer view, expand Stores > WebContent > WEB-INF.
    2. Open struts-config-order-services-fep.xml file:
    3. Find the following code:
      <set-property property="clientFacadeClassName"
       value="com.ibm.commerce.order.facade.client.ServiceProviderOrderFacadeClient"/>
    4. Replace it with the following line:
      <set-property property="clientFacadeClassName" 
       value="com.mycompany.commerce.order.facade.client.ServiceProviderOrderFacadeClientExt"/>
  6. Save your changes.