Utilizzo della sincronizzazione dello spazio di ricerca di Product Advisor

Per utilizzare la sincronizzazione dello spazio di ricerca di Product Advisor, procedere come segue:

  1. Creare un file di informazioni di configurazione XML per la sincronizzazione denominato "PASyncInfo.xml."
  2. In PASyncInfo.xml, specificare PASync.xsd come schema XML da utilizzare. Ad esempio:
      <PASync 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation='PASync.xsd'

    Viene fornito il file PASync.xsd. Il seguente testo mostra i contenuti di PASync.xsd:

  3.  <?xml version="1.0" encoding="UTF-8"?>
     <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
     
      <xsd:element name="PASync">
       <xsd:complexType>
         <xsd:sequence>
           <xsd:element ref="SearchScheme" />
           <xsd:element ref="Command" minOccurs="1" maxOccurs="unbounded" />
         </xsd:sequence>
         <xsd:attribute name = "member" type="xsd:string" use="required" />
         <xsd:attribute name = "store" type="xsd:string" use="required" />
       </xsd:complexType>
      </xsd:element>
    
      <xsd:element name="SearchScheme">
       <xsd:complexType>
         <xsd:sequence>
            <xsd:element ref="RelatedTable" />
              <xsd:element ref="Search" minOccurs="1" maxOccurs="unbounded" />
         </xsd:sequence>
         <xsd:attribute name = "tableName" type="xsd:string" use="required" />      
         <xsd:attribute name = "primary" type="xsd:string" use="required" />      
         <xsd:attribute name = "colName" type="xsd:string" use="required" />      
       </xsd:complexType>
      </xsd:element>
    
      <xsd:element name="RelatedTable">
       <xsd:complexType>
         <xsd:attribute name = "tableName" type="xsd:string" use="required" />      
         <xsd:attribute name = "from" type="xsd:string" use="required" />      
         <xsd:attribute name = "to" type="xsd:string" use="required" />      
       </xsd:complexType>
      </xsd:element>
    
      <xsd:element name="Search">
       <xsd:complexType>
         <xsd:attribute name = "value" type="xsd:string" use="required" />   
       </xsd:complexType>
      </xsd:element>
    
      <xsd:element name="Command">
       <xsd:complexType>
         <xsd:attribute name = "tableName" type="xsd:string" use="required" />    
         <xsd:attribute name = "idColumnName" type="xsd:string" use="required" />   
         <xsd:attribute name = "addCommand" type="xsd:string" />   
         <xsd:attribute name = "updateCommand" type="xsd:string" />   
         <xsd:attribute name = "deleteCommand" type="xsd:string" />   
       </xsd:complexType>
      </xsd:element>
       
     </xsd:schema>
  4. In PASyncInfo.xml, specificare l'ID membro e l'ID entitā negozio per i quali č necessaria la sincronizzazione. Ad esempio:
  5.   member = "-2000"
      store = "10351"
  6. Nell'elemento schema di ricerca in PASyncInfo.xml, specificare gli identificativi CATGROUP che costituiscono lo spazio di ricerca. Ad esempio:
      <SearchScheme
        tableName = "catgroup"
        primary = "CATGROUP_ID"
        colName = "identifier" >
    
        <RelatedTable 
          tableName = "catgpenrel" 
          from = "CATGROUP_ID" 
          to = "CATENTRY_ID" />
    
        <Search value="Pants" />
        <Search value="Shirts" />
    
      </SearchScheme>
    

    Vengono specificati nell'elenco "Pantaloni" e "Camicie". E' possibile specificare tutti gli identificativi CATGROUP che si desidera.

  7. In PASyncInfo.xml, specificare gli attributi per determinare quale comandi programmare. Ad esempio:
        <Command tableName = "CATENTRY" idColumnName = "CATENTRY_ID"
          updateCommand = "UpdateSearchSpaces" 
          deleteCommand = "RemoveProductsFromAllSearchSpaces"
        />
      
        <Command tableName = "CATENTDESC" idColumnName = "CATENTRY_ID"
          addCommand = "UpdateSearchSpaces"
          updateCommand = "UpdateSearchSpaces" 
          deleteCommand = "UpdateSearchSpaces"
        />
      
        <Command tableName = "LISTPRICE" idColumnName = "CATENTRY_ID"
          addCommand = "UpdateSearchSpaces"
          updateCommand = "UpdateSearchSpaces" 
          deleteCommand = "UpdateSearchSpaces"
        />
      
        <Command tableName = "ATTRVALUE" idColumnName = "CATENTRY_ID"
          addCommand = "UpdateSearchSpaces"
          updateCommand = "UpdateSearchSpaces" 
          deleteCommand = "UpdateSearchSpaces"
        />
      
        <Command tableName = "CATENTATTR" idColumnName = "CATENTRY_ID"
          addCommand = "UpdateSearchSpaces"
          updateCommand = "UpdateSearchSpaces" 
          deleteCommand = "UpdateSearchSpaces"
        />
      
        <Command tableName = "CATGPENREL" idColumnName = "CATENTRY_ID"
          addCommand = "AddProductsToSearchSpace"
          deleteCommand = "RemoveProductsFromSearchSpace"
        />
      
      </PASync>
  8. Creare un nuovo file property di personalizzazione Loader.

    Windows NT Windows 2000 AIX Solaris Linux MassLoadCustomizer.properties si trova nell'archivio MassLoader.zip. Estrarre questo file, rinominarlo lasciando l'estensione .properties e posizionarlo in una directory nel classpath.

  9. Importante: Non rimuovere o modificare il file esistente MassLoadCustomizer.properties.

    iSeries ISeries_LODWCSDTA_Customizer.properties si trova nella directory /QIBM/ProdData/WebCommerce/properties. Copiare questo file nella directory /instroot/xml, rinominarlo lasciando l'estensione .properties, quindi apportare tutte le modifiche necessarie al nuovo file. Importante: Non rimuovere o modificare il file originale ISeries_LODWCSDTA_Customizer.properties.

  10. Nel nuovo file property di personalizzazione Loader, specificare il file delle informazioni di configurazione XML. Ad esempio:
      PASyncDocumentURL = PASyncInfo.xml
  11. Nel nuovo file property di personalizzazione Loader, abilitare la sincronizzazione. Ad esempio:
      PASyncEnabled = true
  12. Specificare il nuovo nome del file property di personalizzazione Loader come valore del parametro di personalizzazione del comando Load.
  13. Utilizzare il metodo import SQL o il metodo delete con il comando Load. Di seguito viene riportato un esempio di immissione XML nel Loader:
      <store-asset>
    
         <catentry
           CATENTRY_ID="10351"
           MEMBER_ID="-2000"
           PARTNUMBER="000051"
           CATENTTYPE_ID="ProductBean"
           MFPARTNUMBER="m000051"
           MARKFORDELETE="0"
           BUYABLE="1"
         />
    
         <catentry
           CATENTRY_ID="10352"
           MEMBER_ID="-2000"
           PARTNUMBER="000052"
           CATENTTYPE_ID="ProductBean"
           MFPARTNUMBER="m000052"
           MARKFORDELETE="0"
           BUYABLE="1"
         />
    
         <catentry
           CATENTRY_ID="10353"
           MEMBER_ID="-2000"
           PARTNUMBER="000053"
           CATENTTYPE_ID="ProductBean"
           MFPARTNUMBER="m000053"
           MARKFORDELETE="0"
           BUYABLE="1"
         />
    
         <catentry
           CATENTRY_ID="10358"
           MEMBER_ID="-2000"
           PARTNUMBER="000058"
           CATENTTYPE_ID="ProductBean"
           MFPARTNUMBER="m000058"
           MARKFORDELETE="0"
           BUYABLE="1"
         />
    
         <catentry
           CATENTRY_ID="10365"
           MEMBER_ID="-2000"
           PARTNUMBER="000065"
           CATENTTYPE_ID="ProductBean"
           MFPARTNUMBER="m000065"
           MARKFORDELETE="0"
           BUYABLE="1"
         />
    
         <catentry
           CATENTRY_ID="10372"
           MEMBER_ID="-2000"
           PARTNUMBER="000072"
           CATENTTYPE_ID="ProductBean"
           MFPARTNUMBER="m000072"
           MARKFORDELETE="0"
           BUYABLE="1"
         />
    
         <catgpenrel
           CATGROUP_ID="10354"
           CATENTRY_ID="10372"
           CATALOG_ID="10351"
           SEQUENCE="3"
         />
    
         <catgpenrel
           CATGROUP_ID="10354"
           CATENTRY_ID="10365"
           CATALOG_ID="10351"
           SEQUENCE="4"
         />
    
         <catgpenrel
           CATGROUP_ID="10354"
           CATENTRY_ID="10358"
           CATALOG_ID="10351"
           SEQUENCE="5"
         />
    
         <catgpenrel
           CATGROUP_ID="10355"
           CATENTRY_ID="10372"
           CATALOG_ID="10351"
           SEQUENCE="3"
         />
    
      </store-asset>
    

Nota: La disabilitazione della sincronizzazione dello spazio di ricerca di Product Advisor fornisce migliori prestazioni Loader; quindi, utilizzare tale funzione solo quando č necessario.

Argomenti correlati

Attivitā correlate

IBM copyright