Assets Definitions
Assets are created for loading, indexing, and retrieving data from the Servigistics InService repository. There are different types of assets based on the various purposes they serve. Once configured, the assets of a type are loaded in the repository when adding or deploying a collection.
In general, there are the following types of assets:
• Type Property
• Template
• View Stylesheet
• CSS
• Publication Script
Usually these files are located in the INSERVICE_HOME\InS_SW\SW\System\Assets directory.
Type Property Definition
Usually indexing, filtering, document linking (internal or external), and persistent ID related information is defined through type property definitions. This information enables Servigistics InService to store and retrieve the data efficiently. The type definitions define the following information:
• Search Field Mapping
Identifies various search or autosuggestion fields for a specific XML structure.
◦ Full text
This type of search field is used to perform a global search in Servigistics InService. This type of search looks up the entire source content. Refer to IEXML.xml for an example of a specific type definition.
If you want to restrict the search to just some of its sections or elements, then you can do this by defining multiple XPATH statements in the FULLTEXT specific search field. Refer to PARTSLIST.xml for an example.
◦ Term search
This type of search field enables you to search for a specific term in the source file. The definition is exactly the same as that for full text, but the search is focused to a specific element or section.
• Result fields mapping
Enables you to define search results by setting this definition.
• Persistent node ID mapping
This mapping provides a persistent identity for an XML structure. You must ensure there is a unique ID for each XML document or the load will fail due to the conflict.
• Link mapping
This mapping provides instructions on how to link objects internally and externally to support hyperlinking and cross-references.
• Data filtering mapping
This mapping defines the filtering aspects of the current object. Effectivity expressions are usually specified here.
• Table of contents (TOC) specific mapping
This mapping defines the information of an object specific to a TOC structure.
You can find the sample assets definitions for various business objects such as PH, PI, IS, PS, PARTSLIST, PDFM, IEXML and so forth in the INSERVICE_HOME/InS_SW/System/Assets/Types directory.
View Stylesheet
There are a set of stylesheets defined for each business object to retrieve its content from the Servigistics InService repository. These stylesheets are usually referred to as view stylesheets.
In the stylesheet, you can define how the data needs to be sent to user interface for viewing. The stylesheets are broadly of the following two types.
• Default.xsl
This stylesheet is responsible for the visibility and styling of object information in the user interface. Usually it is applied either on standard business objects such as PARTS, PARTSLIST, IE XML types or objects that contribute to the user interface logic such as GE (group effectivity) or PR (Part Relation).
• Metadata.xsl
These stylesheets are used to retrieve metadata information that exists not in the object information itself but on its associated metadata.
The format of view stylesheets can be any format that serves the user interface. For example, the DITA IE XML view stylesheet produces contents in HTML format; while the PartsList view stylesheet produces JSON.
CSS Definition
View stylesheets can use CSS definitions to format specific object types when rendering to HTML. These files are located in the INSERVICE_HOME/InS_SW/System/Assets/CSS directory.
The CSS markup can also be embedded in the view stylesheet itself.
Template Definition
Templates define the structure of the data to be loaded into Servigistics InService for a specific type. This reduces the memory required for the process and improves performance. Note that if you define a template, make sure to generate data based on that template or the load process fails.
In a template, XML data is represented in a rigid, repetitive form. For reference, refer to the existing templates defined for the product instance, part, and parts list object types
These files are located in the INSERVICE_HOME/InS_SW/System/Assets/Templates directory.
Publication Script Definition
This script defines how the data and assets need to be arranged in the Publication Manager. For a new type, create a file named DefaultNewTYPEScript.xsl, where TYPE is the name of the new type, in the INSERVICE_HOME/InS_SW/System/Assets/Scripts directory. Following is an example publication script: