To change any properties in the subscriptions component
configuration file (SubscriptionConfigurationImpl.xml),
you must create a customized version of the file in a new folder.
The customized version of the file must contain only the changed properties. You
can modify the subscriptions component configuration file to change
the name of attributes you want to use with subscriptions or to adjust
the cancel grace period.
Before you begin
The subscription component supports configuring the following
parameters in the configuration:
The configuration is read when
the subscription component is loaded initially. Once loaded, unless
the configuration is set to be reloaded, the component configuration will
not be changed unless the server is restarted. The subscription component
configuration uses the component configuration extension provided
by the foundation. The configuration is defined in the com.ibm.commerce.subscription.facade.server.config.SubscriptionConfigurationImpl.xml file
which is located in the com.ibm.commerce.subscription folder.
Procedure
- Open
WebSphere Commerce Developer and switch to the Enterprise Explorer
view.
- Create a folder for your customized subscriptions component
configuration file:
- Navigate to the following path:
- In the config folder, add a new com.ibm.commerce.subscription-ext folder
so the path looks like this:
WC_eardir\xml\config\com.ibm.commerce.subscription-ext\.
If
this folder already exists and it contains a customized version of
the SubscriptionConfigurationImpl.xml file, then
open the file and skip to step 7.
- Navigate to the following path:
WC_eardir\xml\config\com.ibm.commerce.subscription\
- Copy the SubscriptionConfigurationImpl.xml file
to the new com.ibm.commerce.subscription-ext folder
you created in the first step.
- Open the copied SubscriptionConfigurationImpl.xml in
an editor. This copy becomes the customized version of the SubscriptionConfigurationImpl.xml file.
- Locate the following code:
<_subscr:SubscriptionComponentConfiguration
xmlns:_subscr="http://www.ibm.com/xmlns/prod/commerce/subscription/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/subscription/config xsd/SubscriptionConfiguration.xsd ">
To avoid validation errors, change it to:
<_subscr:SubscriptionComponentConfiguration
xmlns:_subscr="http://www.ibm.com/xmlns/prod/commerce/subscription/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/subscription/config ../com.ibm.commerce.subscription/xsd/SubscriptionConfiguration.xsd ">
- Change any of the following properties
as required for your site.
- Fulfillment frequency attribute name
- Payment frequency attribute name.
- The time period or duration attribute name.
- Scheduler jobs pick up interval (the amount of look ahead in terms
of time which the scheduler would use once it wakes up)
- A notice period configuration for cancel and other actions which we
might develop.
- Maximum retries for a subscription scheduled actions.
The configuration file is as shown:
<_subscr:SubscriptionComponentConfiguration
xmlns:_subscr="http://www.ibm.com/xmlns/prod/commerce/subscription/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/subscription/config ../com.ibm.commerce.subscription/xsd/SubscriptionConfiguration.xsd "> <_subscr:subscription-catalogEntry-configuration time-period-attribute-name="timePeriod"
fulfillment-frequency-attribute-name="fulfillmentFrequency"
payment-frequency-attribute-name="paymentFrequency"/>
<_subscr:subscription-child-order-configuration RecalculateChildOrderForRecurringOrder="true"/>
<_subscr:notice-period-configuration>
<_subscr:notice-period actionName="Cancel"
duration="12" uom="Hours" />
</_subscr:notice-period-configuration>
<_subscr:scheduled-action-retry-configuration>
<_subscr:scheduled-action scheduledActioName="CreateChildOrder" maxRetries="2"/>
<_subscr:scheduled-action scheduledActioName="Cancel" maxRetries="2"/>
<_subscr:scheduled-action scheduledActioName="Expire" maxRetries="2"/>
</_subscr:scheduled-action-retry-configuration>
</_subscr:SubscriptionComponentConfiguration>
Note: To
add the look ahead interval configuration to the custom file, add: <_subscr:scheduler-lookup-interval>600</_subscr:scheduler-lookup-interval> within
the <_subscr:SubscriptionComponentConfiguration> element.
- Within the
<_subscr:SubscriptionComponentConfiguration>
element,
remove any properties that you have not changed so that only the changed
properties remain in the customized file. - Save and close the customized file.
- Deploy
the customized file to the production environment.
What to do next
The attribute dictionary attributes that are used to specify
the subscription attributes such as fulfillmentFrequency, timePeriod and
paymentFrequency in CMC should match the names defined the subscription
component configuration file.