Previous Topic: Example Script Use in a Search Definition

Next Topic: Configuring the Search Parameter Layout

Install a New Search

This involves the following steps:

  1. Load the SP into the database

    Use any database tool or the CA DLP RunScript function.

    If using RunScript, you must modify the SQL file to conform to RunScript requirements. Specifically, if supporting both Oracle and MSSQL you must prefix the code with the appropriate database identifier, <ORACLE> or <MSSQL>, and terminate it with a semicolon.

    For Oracle, line terminators in PL/SQL must be escaped using a backslash unless the SQL is included using the RunScript EXEC_NATIVESCRIPT command. For example:

    RETURN MyCursor;	would become	RETURN MyCursor\;
    

    The syntax for the RunScript function is:

    wgninfra -localexec wigan/schema/Schema RunScript MyEmailSearch.sql
    

    Alternatively, use the installsql.bat script for the standard searches as a model for installing search SPs into the CMS database; edit it to reference your own SQL files. Find this script in the \Web\Searches folder on your CA DLP distribution media.

  2. Load the search definition file

    In the iConsole:

    1. Browse to the Manage Searches screen and click Install Search .
    2. Locate and install the XML file that contains the search definition. This adds the default searches to the Unpublished folder of the Manage Searches screen, ready for testing.

      Note: During installation, the search definition XML is validated against an XML Schema document 'SearchDefinition.xsd' located in the Web\schemas folder in the CA DLP installation folder. In addition to validating that the correct elements and attributes are specified, the schema also applies constraints to some of the attributes (for example, the length of the search label attribute is limited to 64 chars). Search definitions failing validation are not installed.

      Note: The embedded JavaScript in a search definition can be error prone; as an interpreted language any errors only manifest themselves at runtime. To reduce the possibility of errors in script it is possible to configure the iConsole to validate it when the search definition is installed. This feature is normally turned off as it imposes an unnecessary overhead when installing production search definitions, but it is useful during development of new searches. To enable JavaScript validation set the ValidateSearchJavascript registry setting in the WebService hive to 'true'. Advanced users may want to alter the JavaScript compiler options using the SearchJavascriptValidationOptions registry setting (default is '/warn:3 /fast-'), details of settings are beyond the scope of this document.

  3. Manually copy any help files for the search onto each front-end Web server

    If required, copy the .html and .gif help files into the location specified by the help and help_icon attributes in the XML search definition file. Typically, you have separate help pages for the search screen and search results screen.

    Script files should be copied to the Web\scripts folder

    Do this on each front-end Web server.

  4. Test and publish the new search

    In the iConsole:

    1. Browse to the Administration Searches screen and click Test to test the parameters in the search definition.
    2. Click the Actions drop-down for the search and select Edit to see the properties page for the search, containing all of the parameters defined for the search.
    3. Select Run to test the execution of the search stored procedure.
    4. When testing is complete return to the Administration Searches page, click the Actions drop-down for the search and select Publish to make the searches available to all users logged on to the CMS