Configuration Roadmaps for the Activity Graph Service

Managing the Activity Graph Service 12-7 Up a Database Connection in the Oracle Fusion Middleware Developers Guide for Oracle WebCenter. The application must be configured to send usage events to the Analytics Event Collector. For more information, see Section 13.5, Registering an Analytics Collector for Your Application. Before the Activity Graph service can make recommendations, the Activity Graph engines must have been run at least once to gather the data and calculate similarity scores. For more information see Section 12.4, Preparing Data for the Activity Graph Service. The items suggested in the Similar Items task flow depend on the services that are available in your application. For example, documents are only recommended if the Documents service is available. For information about making a service available in your application, refer to the appropriate chapter for that service. An item can also be filtered out of the recommendations by the Resource Authorizer of the service that owns the item. In a cluster environment, all instances of the Activity Graph engines application should be disabled except for one. For more information, see the section Configuring Activity Graph in the Oracle Fusion Middleware High Availability Guide.

12.4 Preparing Data for the Activity Graph Service

The Activity Graph engines consist of three separate engines for gathering data, calculating similarity scores, and calculating search rankings. These engines are: ■ The Gathering Engine—gathers activities from the Analytics tables and other repositories via a set of registered activity providers. ■ The Collaborative Filtering Engine CFE—calculates similarity scores on pairs of objects and stores them in the activity graph for later generation of similarity recommendations. It does this by performing a set of similarity calculations. Similarity calculations are objects that tell the Collaborative Filtering Engine how to calculate similarity scores on a given set of domain and background node classes. Each resulting similarity score is a number between 0 and 1 designating how similar two objects are to each other given a specific criterion. Similarity calculations are specified by the following properties: their domain and background classes, a distance function, and a relation combination. ■ The Rank Engine—calculates a measure of importance of every node in the activity graph. These activity ranks can be stored in a search index and combined at query time with a query-dependent score to order search results.For more information, see Section 12.7, Setting Up Activity Rank for Oracle Secure Enterprise Search. These scores are also useful in ordering context-free recommendations. For this reason, they are also stored in the Relation Store. Before the Activity Graph service can begin to recommend objects, these engines must be run at least once to gather the data and calculate similarity scores. After this initial run, the engines can be run on demand, or on a schedule to ensure that new activities are captured and analyzed. This section includes the following subsections: ■ Section 12.4.1, Running the Activity Graph Engines on a Schedule ■ Section 12.4.2, Running the Activity Graph Engines on Demand 12-8 Oracle Fusion Middleware Administrators Guide for Oracle WebCenter

12.4.1 Running the Activity Graph Engines on a Schedule

You can run the Activity Graph engines on a schedule to ensure that new activities are captured and analyzed on a regular basis. This is useful for applications with heavy traffic and frequently updated content. To run the Activity Graph engines on a schedule:

1. Log in to Fusion Middleware Control and navigate to the home page for the

WebCenter application.

2. Using the navigation pane, navigate to WebCenterActivity Graph

Engines Activity Graph WC_Utilitiesactivitygraph-engines. 3. Under Web Modules, click the URL for the Activity Graph Schedule and Status Page and log in.

4. On the Activity Graph Schedule and Status page, select Run on a schedule.

5. In the Start on field, enter the date on which you want the schedule to start.

6. In the Run every field, enter a value to determine how regularly the process

occurs. For example, to run the process every day, enter 1 in the field. To run the process every other day, enter 2 in the field, and so on.

7. From the at dropdown list, select the time of day at which you want the process to

start.

8. Click Start.

The process will run on the date specified at the time selected, and then will continue to run as you have scheduled.

12.4.2 Running the Activity Graph Engines on Demand

If the data in your application is not likely to change very frequently, you can run the Activity Graph engines on demand as and when required. You can also use this option to run the Activity Graph engines on demand in between regularly scheduled runs. To run the Activity Graph engines on demand: 1. Log in to Fusion Middleware Control and navigate to the home page for the WebCenter application.

2. Using the navigation pane, navigate to WebCenterActivity Graph

Engines Activity Graph WC_Utilitiesactivitygraph-engines. Note: To access this page, you must be a member of the Administrators group. The Activity Graph Schedule and Status page does not support multibyte user names and passwords, so you must log in using an ASCII-only user name and password. Tip: You can access the Activity Graph Schedule and Status page directly by going to the following URL: http:host:portactivitygraph-engines where http:host:port is the URL for the WC_Utilities managed server. Managing the Activity Graph Service 12-9

3. Under Web Modules, click the URL for the Activity Graph Schedule and Status

Page and log in.

4. Select Run once now.

5. Select Incremental Update to update the tables with any activities that occurred

since the last time the Activity Graph engines ran. Select Full Rebuild to delete all existing data and repopulate the tables with all activities. This may take some time.

6. Click Start.

You can monitor the progress of the process in the Status section of the dialog.

7. Click Stop at any time to stop the process, if required.

8. If you want to return to a regular schedule after the on demand process has run, be sure to select Run on a schedule, check that the details are correct, and then click Start to resume the schedule.

12.5 Customizing Reason Strings for Similarity Calculations

Similarity calculations can have associated reason strings to help users understand why a particular recommendation was made. When a person or object is recommended, if the highest scoring related similarity calculation has an associated reason string, that string is displayed in the task flow. You can edit the reason strings provided for similarity calculations, or create additional strings. Each similarity calculation can define two strings for each reason to provide singular and plural phrasing. Reason strings can be customized with the following tokens: ■ {RECOMMENDED_ITEM}—The name of the current recommended item. ■ {NUMBER_OF_ITEMS}—The number of objects in common. This corresponds to the numerator of the component score. ■ {TOTAL_ITEMS}—The total number of items in common. This corresponds to the denominator of the component score. The meaning depends on the similarity function associated with the top similarity URN. ■ {SIMILARITY_CALCULATION}—The name of the top similarity calculation. Note: To access this page, you must be a member of the Administrators group. The Activity Graph Schedule and Status page does not support multibyte user names and passwords, so you must log in using an ASCII-only user name and password. Tip: You can access the Activity Graph Schedule and Status page directly by going to the following URL: http:host:portactivitygraph-engines where http:host:port is the URL for the WC_Utilities managed server. 12-10 Oracle Fusion Middleware Administrators Guide for Oracle WebCenter For example, the user-connect similarity calculation defines the following two reason strings: reason-user-connect=You share {NUMBER_OF_ITEMS} connections with {RECOMMENDED_ ITEM}. reason-user-connect=You share {NUMBER_OF_ITEMS} connection with {RECOMMENDED_ ITEM}. To customize reason strings for similarity calculations: 1. Open the UIBundle.properties file. 2. Locate the reason string that you want to customize and edit it as required. 3. To create a new reason string, use the following format: reason-similarity-calculation=string 4. Save the UIBundle.properties file.

12.6 Managing Activity Graph Schema Customizations

WebCenter provides out-of-the-box integration with the Activity Graph service that includes metadata definitions for mapping WebCenter service event data from Analytics. This metadata is automatically loaded the first time the Activity Graph engines application starts. You can extend Activity Graph metadata to change how actions are gathered from Analytics by manipulating XML files. To work with the metadata, you must first export the data to an XML file. After editing the XML files, you can then import the metadata back into the Activity Graph service. This section includes the following subsections: ■ Section 12.6.1, Exporting Activity Graph Metadata ■ Section 12.6.2, Exporting Provider Configuration ■ Section 12.6.3, Importing Activity Graph Metadata ■ Section 12.6.4, Deleting Activity Graph Metadata ■ Section 12.6.5, Renaming Actions and Node Classes For information about the ways you can extend Activity Graph metadata, see the section Extending the Activity Graph Service in the Oracle Fusion Middleware Developers Guide for Oracle WebCenter.

12.6.1 Exporting Activity Graph Metadata

Use the WLST command exportAGMetadata to export Activity Graph metadata definitions to an XML file. For command syntax and examples, see the section exportAGMetadata in the Oracle Fusion Middleware WebLogic Scripting Tool Command Reference. For example: exportAGMetadataappName=’activitygraph-engines’, directoryPath=’scratchmonty’, definitionFileName=’activityGraphMetaData.xml’, includeProviderConfigurations=1