Introduced in Feature Pack 2

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

Introduced in Feature Pack 2 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 Aurora storefront for the day-of-month schedule type. The process action command builds the parameters for the day-of-month schedule and invokes Subscription Manager facade client.

Procedure

  1. Copy ServiceProviderProcessRecurringOrderCmdExtImpl.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.order.commands.
    4. Copy ServiceProviceProcessRecurringOrderCmdExtImpl.java from temp\src\com\mycompany\commerce\order\commands to the Package created in step 1c.
  2. Copy ServiceProviderOrderFacadeConstantsExt.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.order.facade.
    4. Copy ServiceProviderOrderFacadeConstantsExt.java from temp\src\com\mycompany\commerce\order\facade to the Package created in the preceding step. This constants file is used in the client facade.
  3. Copy ServiceProviderOrderFacadeClientExt.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.order.facade.client.
    4. Copy ServiceProviderOrderFacadeClientExt.java file from temp\src\com\mycompany\commerce\order\facade\client to the Package created in step 3c.
  4. Update the process action command implementation to use the following one in the CMDREG table:
    1. Connect to the development database.
    2. Run the following SQL statement:
      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.