Introduced in Feature Pack 2

Extending the process action that creates the recurring order in the Subscription Manager

When you create a subscription entry, the create action starts the schedule evaluate command to calculate the full schedule by using the simple schedule type by default.In this tutorial, you extend the recurring order create process action to use the new schedule evaluation command that is created in this tutorial. This extension validates the new parameters and computes the full schedule by using the day-of-month schedule type.

Procedure

  1. Copy the SubscriptionFacadeConstantsExt.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.subscription.facade.
    4. Copy SubscriptionFacadeConstantsExt.java file from temp\src\com\mycompany\commerce\subscription\facade to the Package created in step 1c.
  2. Copy the SubscriptionServerConstantsExt.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.subscription.facade.server.helpers.
    4. Copy SubscriptionServerConstantsExt.java file from temp\src\com\mycompany\commerce\subscription\facade\server\helpers to the Package created in step 2c.
  3. Copy the SubscriptionApplicationMessageKeysExt.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.subscription.logging.
    4. Copy SubscriptionApplicationMessageKeysExt.java file from temp\src\com\mycompany\commerce\subscription\logging to the Package created in step 3c.
  4. Copy ProcessSubscriptionCreateActionCmdExtImpl.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.subscription.facade.server.commands.
    4. Copy ProcessSubscriptionCreateActionCmdExtImpl.java file from temp\src\com\mycompany\commerce\subscription\facade\server\commands to the Package created in step 4c.
  5. Copy the SubscriptionFacadeClientExt.java file:
    1. In the Enterprise Explorer view, expand WebSphereCommerceServerExtensionsLogic > src.
    2. Right-click New > Package.
    3. Name the Package: com.mycompany.commerce.subscription.facade.client.
    4. Copy SubscriptionFacadeClientExt.java file from temp\src\com\mycompany\commerce\subscription\facade\client to the Package created in step 5c.
  6. Update the create action command implementation in the CMDREG table to use the following one:
    1. Connect to the development database.
    2. Run the following SQL statement:
      update cmdreg set classname = 'com.mycompany.commerce.subscription.facade.server.commands.ProcessSubscriptionCreateActionCmdExtImpl' 
      where interfacename = 'com.ibm.commerce.subscription.facade.server.commands.ProcessSubscriptionActionCmd+Create';