Registering a store feature in the marketing database schema
In this lesson, use the idresgen utility along
with the massload utility to insert data for the new store feature
into the database. The tables EMSPOT and DMEMSPOTDEF are used to contain
this information. The EMSPOT contains the entry for the new feature,
DMEMSPOTDEF contains the configuration information for the new feature.
About this task
Procedure
- Navigate to WCDE_installdir > schema > xml
- Edit the wcs.dtd file to set the USAGETYPE
attribute for EMSPOT table to
#IMPLIED
instead of a default value ofMARKETING
Note: This step is done by default in Feature Pack 4 and Feature Pack 5.- Locate the following code snippet:
<!ELEMENT emspot EMPTY> <!ATTLIST emspot empspot_id CDATA #IMPLIED storeent_id CDATA #IMPLIED name CDATA #IMPLIED description CDATA #IMPLIED supportedtypes CDATA #IMPLIED lastupdate CDATA #IMPLIED defaultrule CDATA #IMPLIED optcounter CDATA #IMPLIED usagetype CDATA "MARKETING">
- Replace the
usagetype
attribute entry for this table with the following code:usagetype CDATA #IMPLIED
- Save your changes and close the file.
- Locate the following code snippet:
- Define the xml file for the feature entry. The xml file
resolves the
emspot_id
anddmemspotdef_id
attributes. The values prefixed with@counter_
indicate that this attribute entry must be resolved with the KEYS table when run through the idresgen utility.- Navigate to WCDE_installdir > schema > xml.
- In the xml folder, create a file called wcs.ContactToolTip.xml.
- Open wcs.ContactToolTip.xml for editing.
- Add the following code snippet:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE import SYSTEM "wcs.dtd"> <import> <emspot EMSPOT_ID="@counter_0000000114" STOREENT_ID="10001" NAME="ContactDisplayToolTip" DESCRIPTION="ContactCardFeature" USAGETYPE="STOREFEATURE"> </emspot> <dmemspotdef DMEMSPOTDEF_ID="@counter_0000000115" EMSPOT_ID="@counter_0000000114" STOREENT_ID="10001" CONTENTTYPE="FeatureEnabled" CONTENT="false"> </dmemspotdef> </import>
Note: If required, edit the store ID for the Madisons starter store in the code to meet your correct value. - Save your changes and close the file.
- Run the wcs.ContactToolTip.xml file
through the idresgen utility to create a resolved xml file to use
with the massload utility.
- Open a Command Prompt.
- Navigate to WCDE_installdir > bin.Note: Ensure the WebSphere Application Server is stopped.
- Run the idresgen utility on the wcs.ContactToolTip.xml file.
idresgen <input xml filename> <output xml filename>
For example:idresgen ..\schema\xml\wcs.ContactToolTip.xml ..\schema\xml\wcs.ContactToolTip_resolved.xml
Note: The wcs.dtd file must be located in the same folder as wcs.ContactToolTip.xmlFor more information, see idresgen utility.
- Insert the new store feature data into EMSPOT and DMEMSPOTDEF
tables by running the massload utility on the resolved output XML
file:
- Open a Command Prompt.
- Navigate to WCDE_installdir > bin.
- Run the massload utility on the wcs.ContactToolTip_resolved.xml resolved
output xml file:
massload <input xml filename>
For example:massload ..\schema\xml\wcs.ContactToolTip_resolved.xml
For more information, see massload utility (Development environment).