Customizations and Extensions

This chapter covers the following topics:

About this Chapter

This chapter includes customization and extension tasks to set up Oracle Knowledge Management.

Customize with Personalization

The OA framework provides personalization functionality to the agent user interface. Personalization allows easy configuration of pages to match the business needs of different customers.

The following are examples of OA framework personalization:

In addition to the preceding examples, the OA framework provides flexibility in customization, such as:

Important Notes on Personalization

Following are important notes about using Personalization with Oracle Knowledge Management.

Restrictions on Personalization

The following is a list of restrictions for using personalization.

Configure with Function Instead of Personalization

You must configure the following items using function instead of personalization since they are security related:

For more information, see Access Control.

Personalize Attachments

The following are notes for personalizing attachments:

Personalize by Setting FND: Personalization Region Link Enabled

You can personalize the following items by setting FND: Personalization Region Link Enabled:

Personalization Resources

For more information on personalization, see Oracle Applications Framework Personalization Guide.

Define Simple Search Repositories

Main topics that help you manage simple searches include:

Create a Simple Search Custom Repository for a Service Provider

You can create new Simple Search custom repositories for service providers. If you want to create Simple Search repositories for service requestors, see Create a Simple Search Repository for a Service Requestor.

Note: The steps within this section are optional.

The following topics describe how to create new Simple Search custom repositories for service providers:

Create a New View Object to Perform Search

The following procedures describe how to create a new View Object to perform searches.

Steps

  1. Create a new View Object (VO.xml) that includes the query to retrieve results from your new repository.

  2. Create a new View Object implementation (VOImpl.java) that extends oracle.apps.cs.knowledge.solution.search.server.RepositoryStandard.

    Example: UnifiedSearchSolutionsVOImpl.java

  3. Implement the setParameter(HashMap) method of the VOImpl.

    You should set all the mandatory parameters in your query in this method.

    The HashMap stores the following search criteria:

    • KMSearchConstants.SEARCH_METHOD is the key for search method

    • KMSearchConstants.SEARCH_KEYWORD is the key for key word

    • KMSearchConstants.PRODUCT_ID is the key for inventory item ID

    • KMSearchConstants.PRODUCT_ORG_ID is the key for inventory item organization ID.

    • KMSearchConstants.CATEGORY_ID is the key for the current Solution Category ID.

  4. Override executeQuery() if you want to customize the behavior of your VO before or after the query execution.

    You need to invoke super.executeQuery() in your method.

  5. Place VO.xml in the package under in $APPL_TOP/java.

  6. Compile VOImpl.java and place the .class in the package under $APPL_TOP/java.

Create a New View Object to Perform the Count Query

The following procedures describe how to create a new View Object (VO) to perform the count query. This VO gets the total number of records that match the search criteria.

Steps

  1. Create a new View Object (CountVO.xml) that includes the query to retrieve the results count from your new repository.

  2. Create a new View Object implementation (CountVOImpl.java) that extends oracle.apps.cs.knowledge.solution.search.server.RepositoryStandard.

    Example: CountUnifiedSearchSolutionsVOImpl.java

  3. Implement the setParameter(HashMap) method of CountVOImpl.

    You should set all the mandatory parameters in your query in this method.

    The HashMap stores the following search criteria:

    • KMSearchConstants.SEARCH_METHOD is the key for search method.

    • KMSearchConstants.SEARCH_KEYWORD is the key for key word.

    • KMSearchConstants.PRODUCT_ID is the key for inventory item ID.

    • KMSearchConstants.PRODUCT_ORG_ID is the key for inventory item organization ID.

    • KMSearchConstants.CATEGORY_ID is the key for the current Solution Category ID.

  4. Override executeQuery() if you want to customize the behavior of your VO before or after the query execution.

    You need to invoke super.executeQuery() in your method.

  5. Place CountVO.xml in the package under in $APPL_TOP/java.

  6. Compile CountVOImpl.java and place the .class in the package under $APPL_TOP/java.

Create a New JRAD Region

The following procedures describe how to create a new JRAD region.

Steps

  1. Create a new JRAD region in its own XML file.

    Example: SolutionResultRN.xml

    The style of the region should be defaultSingleColumn.

  2. The UI components can reference the corresponding search VO.

    Example: UnifiedSearchSolutionsVO

  3. Import the JRAD region into the database using XMLImporter.

Create a New Controller Object for Your Region

The following procedures describe how to create a new controller object for your region.

Steps

The Controller code (CO.java) can reference the corresponding search VO, for example, UnifiedSearchSolutionsVO.

  1. Add logic to the processRequest() method to programmatically control the UI components of your region.

  2. Add logic to the processFormRequest() method to process event from your region.

  3. Compile CO.java and place the .class in the package under $APPL_TOP/java.

To add or remove service provider's Simple Search repositories, see Define a Simple Search Custom Repository for a Service Provider.

Define a Simple Search Custom Repository for a Service Provider

You can add or remove service provider repositories for use in Oracle Knowledge Management.

To define the repository, use the same steps that are presented in the Implementation Tasks chapter:

  1. Manage Repositories

  2. Map Contexts to Repositories

Create a Simple Search Repository for a Service Requestor

You can create new Simple Search repositories for service requestors. If you want to create Simple Search repositories for service providers, see Create a Simple Search Repository for a Service Provider.

Note: The steps within this section are optional.

Topics in this section include:

Terminology

Terminology includes:

SearchKeySet

The SearchKeySet class represents the search queries. A search query specifies one or more search keys along with following optional qualifiers:

A search string without any qualifier represents an optional key.

For example, key1 +key2 -key3 is a query, where key1 is optional, key2 is required, and key3 should be excluded.

An instance SearchKeySet contains parsed information for each type of search key.

SearchItem

SearchItem is an interface for any display program to display search results from various engines in a uniform fashion. Individual applications must implement this interface and can extend it for more advanced usage.

SearchResult

SearchResult is the class that represents the search results. It contains a vector of SearchItems. A search runs in batches. An instance of SearchResult represents one batch. It also contains information about the total size of the search result, the starting index, the search factory used to do the search and the search result heading, and any hints for searching.

SearchService

SearchService is an abstract class that serves as the super class for all search service implementations. It is a template for developers to write search engines to fit in the Search Management mechanism, namely to work with the SearchManager. The SearchService runs in a separate thread. This class provides APIs for finding when to stop the search and to make the search results accessible to the SearchManager.

SearchManager

SearchManager is the core class that hooks up all of the preceding pieces together and performs the search operation. SearchManager provides the method for searching for a key in a given category. SearchManager also provides APIs for finding out all the categories from the application configuration and interfacing with FND_Lookup tables for registering new categories and retrieving them. Each category has a key, which the system uses for searching, and a corresponding value, which the system uses for display purposes.

APIs

SearchItem Interface: public interface oracle.apps.jtf.search.SearchItem

public int getPercentMatch();

Returns a number greater than zero and at most 100. This number represents the confidence level of the match.

public String getTitle();

Returns the name of the matching object to display.

public String getDescription();

Returns a short description of the matching object. This method is optional. Its result does not appear by default.

public String getLink();

Returns the hyperlink to access the matching object.

public Hashtable getCustomAttribVals();

Note that the SearchItem can hold application specific search item information as name value pairs in a hash table. Using this mechanism, each application can pass back custom information as part of the search result.

SearchService Class: public abstract class oracle.apps.jtf.search.SearchService

public abstract void search(String category, SearchKeySet query, int limit, int start, int batchSize, Hashtable extraSearchParams)

Searches and uses insert, setTotal, and setHint methods to send results to the calling thread.

Parameters:

protected final void insert(SearchItem s);

For each matched item found, the search service needs to create an instance of SearchItem and uses this method to make it accessible to the SearchManager.

public abstract String getName();

Returns the name to be published in the Searchable object directory. Each service implementation needs to implement this method.

public abstract String getUsage();

Returns usage info, such as special parameters. Each service implementation needs to implement this method.

SearchManager Class: public abstract class oracle.apps.jtf.search.SearchManager

public static Hashtable search(String category, String query, int start, int limit, Hashtable extraSearchParams);

Performs the following tasks:

Develop the Search Service

You must write the search service factory and the corresponding search service implementation. Each service factory corresponds to one or more search categories. The search service factory can be a standard class, such as the sample search factories in oracle.apps.jtf.devtest.services.SimpleSearchFactory. The difference is the creation of the service instance. The service implementation class must inherit from SearchService. It must implement the search method as described above under SearchService. For each matched item found, the search service needs to create an instance of SearchItem and use the insert method of the superclass to make it available to the SearchManager. Additionally, each service must implement the following, which are described further above:

The search service also must set the total number of items returned and the search result heading used for display purposes. Do this using the following methods of its superclass:

You can look at oracle.apps.jtf.devtest.services.SimpleSearch for sample search service implementation. Note that a service runs in a new thread. It shares its session with the main thread. Therefore, the restrictions of spanning a new thread applies to the search thread. For example, you cannot use the transaction service within the new service. To get a database connection, use oracle.apps.jtf.aom.transaction.TransactionScope.getNewConnection() rather than oracle.apps.jtf.aom.transaction.TransactionScope.getConnection(). Note that oracle.apps.jtf.search.SearchService provides the method protected final boolean timeToStop(), which you can use in the service implementation to find out whether the time that the SearchManager provided for service execution has expired.

Register the Category

You must register each search category in the FND_Lookup tables. Register them under the category IBU_SEARCH_CATEGORIES. SearchManager provides API's for registering a new category with FND tables. Each category consists of a category code (a parameter to the search service implementation that you use in application configuration) and the corresponding value (used for display purposes only).

Login

Oracle Applications Forms.

Responsibility

Application Developer

Prerequisites

Develop the Search Service

Navigation

Application Developer > Application Object Library

Register the Search Service

All the search service factories for current application are registered with the property search.factories. The definition for this property is:

search.factories = <factory1 class name >;<factory2 class name>; …

For example:

search.factories = oracle.apps.jtf.devtest.services.ComplexSearchFactory;oracle.apps.jtf.devtest.services.SimpleSearchFactory

For each search factory, you must provide the following entries:

For example:

Login

System Administrator Console within the CRM Technology Foundation

Responsibility

CRM HTML Administration

Prerequisites

Register the Category

Navigation

Settings > System > Properties > Advanced

See Also

To add or remove Simple Search repositories for service requestors, see Define a Simple Search Repository for a Service Requestor.

Define a Simple Search Repository for a Service Requestor

You can add or remove repositories for service requestors for use in Oracle Knowledge Management.

Note: Before you can add a repository, verify that you have created a Simple Search repository for service requestors. For more information on creating service requestor repositories, see Create a Simple Search Repository for a Service Requestor.

Simple Search for a service requestor--also known as Basic Search--is built on the CRM Technology Foundation (JTT) technology stack.

Topics in this section include:

Include a New Simple Search Repository for a Service Requestor

Login

JTF application

Responsibility

CRM HTML Administration

Navigation

System > Properties > Advanced

Steps

  1. Choose the application IBU in the View LOV.

  2. Find the search.factories key.

  3. Add the following entry:

    Sequence Value

    <next seq> oracle.apps.cs.knowledge.oes.OesSearchFactory

  4. Set the SES properties for the following:

    EndPoint=

    ProxyHost=

    ProxyPort=

    DataGroups=

  5. In order for Knowledge Management search framework to pick up the SES repository during search, add the SES repository to the “Knowledge: Repositories to search across in simple search” profile at the iSupport application level (or responsibility level).

    For example, if the profile value was originally SOLUTIONS,SOLUTION CATEGORIES,LIBRARY, then change this to: SOLUTIONS,SOLUTION CATEGORIES,LIBRARY,OES

  6. Login to iSupport, navigate to the Support Tab, and perform a search. The SES repository should appear.

Remove a Seeded Repository from the Simple Search

The following procedures describe how to remove a seeded repository from the Simple Search.

Login

Oracle Applications Forms

Responsibility

System Administrator

Prerequisites

None

Navigation

Profile > System...Find System Profile Values window

Steps

  1. Look up the profile option Knowledge: Repositories to search across in simple search and remove the category of the repository at the appropriate level: Site, Application, Responsibility, or User.

    For more information on profile options, see Set Up Profile Options.

    Note: The category of the new repository is the value of the JTT property service.<classpath>.categories that you created when setting up the JTT QuickFind repository.

  2. Bounce the Web server.