Extract XoomXML for Required Indexes

The Extract XoomXML for Required Indexes transformation creates a XoomXML file that will, on deployment, create any missing indexes that are required for proper interpretation of all the defined Object References in configuration.

In order for Service Optimization to correctly interpret the references to Objects within SXP messages, any referenced Object needs to have: These indexes are sometimes missing. Service Optimization does not currently contain a mechanism to verify whether they are there, or to create them when they aren't. Missing indexes result in unpredictable errors that only tend to become visible late in the project, or even in production, when data of sufficient richness becomes available.

Given a XoomXML file containing Service Optimization structure (i.e. Scheme and an Object Reference setting), the Extract XoomXML for Required Indexes transformation creates a XoomXML file that will, on deployment, create any indexes that are missing from configuration.

Example

In the Service Optimization Remote Administration Tool, we can see that Contract has Object Reference defined on Name.
Example of Object Reference defined on a Property
However, when we look up Contract using the Service Optimization Structure Tool, we can see there is no index for Name.
Example of missing index for Object Reference
If we execute the Extract XoomXML for Required Indexes transformation, it generates the following XoomXML for Contract (the other indexes have been deleted for ease of readability).
    <Collection xoom:id="Collection[Contract]">
      <IdName>Contract</IdName>
      <xoom:set select="Indexes/Index[ IdName = 'Name' ]">
        <ID>1</ID>
        <IdName>Name</IdName>
        <Name>Contract__Name</Name>
        <IsProduct>False</IsProduct>
        <Context>
          <Property xoom:ref="Contract Property[Name]">Name</Property>
        </Context>
      </xoom:set>
    </Collection>
When the whole XoomXML file is deployed, the missing index is instated with the above Properties.
Missing index has been instated

Optional parameter

The transformation also takes an optional parameter: IncludeExistingIndexes with value 0 (default) or 1. If specified, this will cause the transformation to include all indexes that are required by existing Object References, regardless of whether they are currently missing or not. To include the parameter, execute the transformation using Xoom Processor.

For example, the following command extracts both existing and missing indexes and saves them in the file ExistingAndMissingIndexes.xml:
  • xp : # =:IncludeExistingIndexes=1 ExtractXoomXMLForRequiredIndexes.xml ExistingAndMissingIndexes.xml