ENTERPRISE 8 VIP Note 18 VIP Personalization Connector for WebSphere

T H E P O W E R O F C O N T E N T A T W O R K

Copyright © 1999-2001 Gauss Interprise AG Hamburg, Gauss Interprise, Inc. Irvine, California. All rights reserved worldwide. This document and the related software are property of Gauss Interprise AG or its suppliers and protected by copyright and other laws. They are distributed under licenses restricting their use, copying, distribution, and decompilation. Neither receipt nor possession of this document confers or transfers any right to reproduce or disclose any part of the contents hereof. No part of this document may be reproduced in any form by any means without prior written authorization of Gauss Interprise AG or Gauss Interprise, Inc. Although great care has been taken in the compilation of texts and illustrations, the possibility of errors cannot be excluded. Therefore, Gauss Interprise AG, Gauss Interprise, Inc. and the authors do not assume any liability for the accuracy and the completeness of the information contained in this document. The authors would be grateful for information about any errors. Above and beyond this, Gauss Interprise AG and Gauss Interprise, Inc. are only liable in accordance with their respective General Terms and Conditions regarding the Software sold together with this document. DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESSED OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. SpyView, SpyImage, VIP ContentManager, VIP PortalManager and VIP ContentMiner are registered trademarks of Gauss Interprise AG and Gauss Interprise, Inc. All other products and brand names referred to or mentioned are trademarks and in the property of their respective owners. http://www.gaussvip.com Program version: 8.0 Document version: En-01 Publication date: October 2001

Table of Contents Typographic conventions

5

Introduction

6 Package contents

Requirements

6

8 Hardware Software

Configuration

8 8

9 Configuring WebSphere Application Server (WAS) Modifying and deploying configuration files

9 12

Important Notes

15

Running WebSphere Application Server

16

Starting WebSphere Application Server Ensure installed components

Logging

16 16

17 VIP logging IBM logging

Using the WebSphere Personalization Resource Console Defining a resource collection Creating a resource hierarchy

Using WebSphere Studio Creating resources

Rules, Classifiers and Actions Example

Personalizing VIP Content Classifier description and examples Action description and examples Rule description and example JSP example (commonpage.jsp)

VIP Note 18 – VIP Personalization Connector for WebSphere

17 17

19 20 22

25 25

27 27

30 31 33 36 38

3

Troubleshooting Setting the classpath in WebSphere Application Server WebSphere Personalization WebSphere Studio

Index

VIP Note 18 – VIP Personalization Connector for WebSphere

41 41 42 44

46

4

Typographic conventions

Typographic conventions The following conventions are used in the text to draw attention to program elements etc.: Element

Font or Symbol

Examples

Menu → Entry

File → Create

Paths to directories, file and directory names

Drive:\Directory\Filena me

C:\Programs\VIP

Quotations from program code or configuration files

Code quotations

Program interface such as menu commands, windows, dialogs, field and button names

[windows] #Path for VIP on the clients CLIENTPATH=d:\\vip

Variables, i.e. placeholders for specific elements

{Variable}

{VIP installation directory}

Important information and warnings are enclosed in gray boxes. Be sure to read such information to avoid making errors when using and administering VIP CM systems, and hence losing data.

VIP Note 18 – VIP Personalization Connector for WebSphere

5

Introduction

Introduction This VIP Note describes VIP Personalization Connector for WebSphere and explains the technical requirements for installing and running it. Furthermore, it contains a description of actions, classifiers, rules, and JSP files that are created with WebSphere Studio Version 3.5.2. It also covers a JSP example and ends with a troubleshooting section. VIP Personalization Connector for WebSphere is a Java interface connecting IBM WebSphere Personalization and IBM WebSphere Application Server, respectively, and the VIP Content Management system by Gauss Interprise. IBM WebSphere Personalization provides customer relationship management with easy-to-use business controls. It includes a powerful business rules engine in IBM WebSphere Studio for categorizing users and targeting specific content, including classification, query, and content selection rules. Dynamic rules to access a thirdparty content database are created and can be used to retrieve personalized content based on the classification of the specific user. VIP Personalization Connector for WebSphere uses the WebSphere Personalization features to return dynamic content managed by the VIP CM system. VIP ContentManager as the basic Gauss Interprise product assures a quality-controlled web content management workflow based on access rights for individual users, topics or specific web objects. VIP Personalization Connector for WebSphere extends the powerful capabilities of the VIP CM Suite and IBM WebSphere Personalization. VIP Personalization Connector for WebSphere runs within IBM WebSphere Application Server, the content is retrieved in real-time which prevents the occurrence of outdated documents.

Package contents The complete VIP Personalization Connector for WebSphere package contains the following files:

n VipN ote18_WebSphere_en. pdf This is the PDF version of this VIP Note.

VIP Note 18 – VIP Personalization Connector for WebSphere

6

Introduction

n Per sConn ector Webspher e.j ar This jar file contains the class files which implement the IBM resource interfaces to retrieve the contents from the VIP CM system using WebSphere Application Server.

n vi p. proper t ies This file contains the necessary attribute value pairs to initialize WebSphere Application Server. It also contains logging options.

n A tt r ibut eMappi ng. proper t ies This file provides the mapping of IBM attributes to VIP attributes. Only the specified attributes will be used to create classifiers, actions and rules for performing queries on the VIP CM system.

n { VI P_Hom e}/ acs/w ebspher e This directory contains the sample files described in this VIP Note.

VIP Note 18 – VIP Personalization Connector for WebSphere

7

Requirements

Requirements To use VIP Personalization Connector for WebSphere, the following hardware and software components are required.

Hardware

n IBM compatible PC with Pentium III processor (recommended) n 512 MB RAM (recommended) Software

n Windows NT 4.0 with Service Pack 6.0 (mandatory). n IBM WebSphere Application Server Advanced Edition, Version 3.5 with Service Pack 4 For running this version, it is required that IBM DB2 Enterprise Edition 7.1 and IBM HTTP Server (or any other HTTP supported by WebSphere Application Server) are installed. For more details, please visit http://www-4.ibm.com/software/webservers/ appserv/doc/v30/ae/web/help/begin_here.htm

n IBM WebSphere Personalization Make sure that IBM WebSphere Personalization, Version 3.5.2 is installed and running. Further information can be found under http://www-4.ibm.com/ software/webservers/personalization/doc/v352/personalization/pznprgrf.htm

n IBM WebSphere Studio Make sure that IBM WebSphere Studio, Version 3.5 or 3.5.2 is installed. For more details, please visit http://www.ibm.com/software/websphere/studio

n VIP CM system Make sure that VIP ContentManager 8.0 (or compatible) is installed. Configure the VIP CM system according to the steps described in the VIP documentation. You can download the current version of the documentation from the Gauss SupPortal.

VIP Note 18 – VIP Personalization Connector for WebSphere

8

Configuration

Configuration For paths and directories, the following variables are used in this configuration description: {VIP_HOME}

Installation directory of the VIP CM system, e.g. d: / vip

{WAS_HOME}

Installation directory of WebSphere Application Server, e.g. e: / ibm /Webspher e/A ppSer ver

{HTTP_SERVER_HOME} Installation directory of the HTTP server used, e.g. e: / ibm /HTT P Ser ver Before using VIP Personalization Connector for WebSphere, you have to modify some files in WebSphere Application Server and IBM HTTP Server.

Configuring WebSphere Application Server (WAS) The following steps must be carried out in the WAS configuration: 1. Open the WebSphere Advanced Administrative Console.

VIP Note 18 – VIP Personalization Connector for WebSphere

9

Configuration

Fig. 1 – WebSphere Advanced Administrative Console

2. Select the application server for which you want to configure the command line arguments. 3. Add to the command line arguments as first class path entry { VI P_HOM E} \l ib\ xer ces.j ar 4. Select the web application for which you want to set the classpath, document root and invoker servlet configuration. 5. Click the Advanced tab to set the classpath, document root and invoker servlet configuration.

n Document-Root –Define { VI P_HO ME} \w ebsit e to be the document root. n Invoker Servlet – Add to the list of servlet web paths the entry def ault _host \{ W EB_APP LICATIO N} \ser vlet \ *

VIP Note 18 – VIP Personalization Connector for WebSphere

10

Configuration

n Classpath – Define all the necessary classpaths settings to run the application you want to access. According to the classpath settings in the { VI P_HOM E} \set Cl asspat h. bat file, specify the classpath, as follows:

Classpath specifications {VIP_PATH}\ lib\activation.jar {VIP_PATH}\ lib\collections. jar {VIP_PATH}\ lib\engine.j ar {VIP_PATH}\ lib\jh.jar {VIP_PATH}\ lib\jcert.jar {VIP_PATH}\ lib\jdom.jar {VIP_PATH}\ lib\jnet.jar {VIP_PATH}\ lib\jsse.jar {VIP_PATH}\ lib\ldap. jar {VIP_PATH}\ lib\mai l.jar {VIP_PATH}\ lib\classes12.zip {VIP_PATH}\ lib\providerutil .jar {VIP_PATH}\ lib\rul esall.jar {VIP_PATH}\ lib\servlet.jar {VIP_PATH}\ lib\xerces. jar {VIP_PATH}\ lib\base.jar {VIP_PATH}\ lib\coma.jar {VIP_PATH}\ lib\comi.jar {VIP_PATH}\ lib\exportimport.jar

VIP Note 18 – VIP Personalization Connector for WebSphere

11

Configuration

Classpath specifications {VIP_PATH}\ lib\hcl.jar {VIP_PATH}\ lib\installation.jar {VIP_PATH}\ lib\poma.jar {VIP_PATH}\ lib\tools. jar {VIP_PATH}\ lib\PersConnectorWebsphere.j ar

6. Add these classpath entries also to the classpath settings of the PersAdmin web application which is part of the Websphere Personalization package. The classpath settings must be specified for the use of the WebSphere Personalization Resource Console. For more information about the WebSphere Personalization Resource Console, please refer to section “Using the WebSphere Personalization Resource Console” on page 19. 7. Copy the {VI P_HO ME} /co nfi g directory to the { WAS_HOM E} /cl asses directory. Check whether the classes directory is included in the classpath of the { WAS_H OME} / bin/ admi n. confi g file.

Modifying and deploying configuration files To run VIP Personalization Connector for WebSphere, the vi p. proper t ies and A tt r ibut eMappi ng. pro pert ies configuration files are required. These files must be available in the {WAS_HO ME} / proper t ies directory before starting WebSphere Application Server. Furthermore, the file P ersC onnector Webspher e. jar must be deployed. vi p. prop ert ies The following attributes must be available in the vip. pr oper ti es file before running WebSphere Application Server.

n oid.token This is the separator between the website name and the OID which is necessary to retrieve contents from a specific website. If a rule is specified as

VIP Note 18 – VIP Personalization Connector for WebSphere

12

Configuration

follows: id=’myRepository#oid’, the contents will only be retrieved from myRepository. The default value is #.

n repository.name This is the name of the repository from which the VIP contents are retrieved.

n attribute.name This is the name of the attribute mapping file in which the WebSphere/VIP attribute pairs are stored. For every WebSphere attribute, the corresponding VIP attribute will be taken and used to perform a query on the VIP CM system. The default value is AttributeMapping.properties.

n session.id This is the default session ID used by the VIP CM system to maintain the uniqueness of the session ID. The default value is _session_id_ .

n debug This is the flag for debugging. If the value of this attribute is true, debug messages will be printed in the log files configured for WebSphere Application Server. If the attribute value is false (default), no messages will be printed.

n detail This is another flag for printing the debug messages. If the value of this attribute is true, detailed debug messages, i.e. including the class name and the method will be printed. If the attribute value is false (default), only normal messages will be printed. After the VIP specific entries have been set as required in the vi p.pr oper t ies file, the following deployment steps must be carried out: 1. Store the vip .pr oper ti es file in the {WAS_HO ME} / proper t ies directory. 2. Check whether the { WA S_HOM E}/ pr oper ti es directory is included in the classpath of the { WAS _HOME }/ bi n/adm in. conf ig file. 3. Change the path { WA S_HOM E} according to your WebSphere Application Server installation.

VIP Note 18 – VIP Personalization Connector for WebSphere

13

Configuration

A tt r ibut eMappi ng. pro pert ies This file contains the WebSphere/VIP attribute mappings that are used to retrieve content from the VIP CM system. Please proceed as follows to deploy the At tr i buteM apping. pr oper ti es file: 1. Store the At tr i buteM apping .pr oper ti es file in the {WAS_HO ME} / pr oper t ies directory. 2. Change the path { WA S_HOM E} according to your WebSphere Application Server installation.

VIP Note 18 – VIP Personalization Connector for WebSphere

14

Important Notes

Important Notes Please note the following important information:

n Date format When specifying the date in a rule or action, it is preferred to specify the date with a format using the to_date keyword e.g. to_date(‘dd/MM/yyyy’,’01/ 03/2000’). You can also specify a date without using the to_date keyword, but then it must be of the format MM/dd/yyyy HH:mm:ss z (z stands for the time zone, e.g. +5:00 for 5 hours difference to GMT).

n IP address The IP addresses for VIP and IBM servers must be the same. The IP address can be modified for the IBM servers after the installation whereas the IP address for the VIP CM system must be set at the beginning of the installation process.

n Session management As it is not possible to get the user or the session ID via the API available in the IBM Resource classes, the VIP content requested by WebSphere Personalization must be readable by everyone (“World”).

VIP Note 18 – VIP Personalization Connector for WebSphere

15

Running WebSphere Application Server

Running WebSphere Application Server Starting WebSphere Application Server To start WebSphere Application Server, proceed as follows: 1. Start the IBM WebSphere Admin Server from the NT services panel (via Start → Control Panel → Services) or by double-clicking the adm incon sole. bat file (the first option is recommended). 2. Select WebSphere Application Server and start it.

Ensure installed components After starting WebSphere Application Server, make a request for any VIP content. The entries of the first message that appears in the log file will either be as follows: oid.token=# repository.name=SoftdrinkFactory_prod attribute.name=AttributeMapping.properties session.id=_session_id_ debug=true detail=true

or according to the values you configured in the vi p.pr oper ti es file. Make sure that the debug flag is true, otherwise you will not be able to view these messages.

VIP Note 18 – VIP Personalization Connector for WebSphere

16

Logging

Logging It is possible to configure the logging for the VipDocumentProvider classes. As these are the connector classes for WebSphere and VIP, the logging configuration has to be carried out on both servers.

VIP logging To activate the logging of VIP Personalization Connector for WebSphere classes, the debug attribute in the file vip. pr opert i es must be set to true. Refer to section “debug” on page 13.

IBM logging The lBM logging can be configured in WebSphere Application Server during or after the installation. Proceed as follows: 1. Open the WebSphere Advanced Administrative Console. 2. Select the Application server for which you want to set the logging. 3. Specify the Standard output file name and the Standard error file name by including the complete paths in the corresponding fields (see the path settings in figure 1 “WebSphere Advanced Administrative Console” on page 10, for example). If you do not specify the path, the log files will appear in the { WAS_HOM E} /l ogs directory.

VIP Note 18 – VIP Personalization Connector for WebSphere

17

Logging

Fig. 2 – WebSphere Advanced Administrative Console – logging settings

VIP Note 18 – VIP Personalization Connector for WebSphere

18

Using the WebSphere Personalization Resource Console

Using the WebSphere Personalization Resource Console You must use the Resource Console to deploy VIP Personalization Connector for WebSphere. The Resource Console is used to specify the resource classes for retrieving content to create a resource collection, and to specify resource hierarchies. The creation of collections and hierarchies has to be carried out in a determined order. First, you have to create a resource collection, then you can create a resource hierarchy (as you have to enter the name of the resource collection while creating a resource hierarchy). The resource hierarchy file (. hr f) is essential for building your rule files. For more information about rules, refer to section “Rules, Classifiers and Actions” starting on page 27. To open the Resource Console, enter the URL http://{server-address}/PersAdmin/ adminframe.jsp in the URL entry field of the browser window. {server-address} corresponds to the IP address of the computer on which WebSphere Application Server is running. In the following example, a placeholder has been used for the IP address:

VIP Note 18 – VIP Personalization Connector for WebSphere

19

Using the WebSphere Personalization Resource Console

Fig. 3 – The Resource Console

Defining a resource collection To define a resource collection, proceed as follows: 1. Open the Resource Console, and click the Resource Collections button. 2. Click the Add button to define the resource collection for the VIP CM system.

VIP Note 18 – VIP Personalization Connector for WebSphere

20

Using the WebSphere Personalization Resource Console

Fig. 4 – Creating a resource collection in the Resource Console

3. Specify the following settings as shown below:

n Collection Name: VipContent n Resource Type: Content n Resource Class: de.gauss.vip.cmpi.ibm.VipResource n Resource Domain Class: de.gauss.vip.cmpi.ibm.VipResourceDomain n Resource Manager Class: de.gauss.vip.cmpi.ibm.VipResourceManager 4. Click the Create Collection button to create the collection.

VIP Note 18 – VIP Personalization Connector for WebSphere

21

Using the WebSphere Personalization Resource Console

Fig. 5 – The created collection

Creating a resource hierarchy To create a resource hierarchy, proceed as follows: 1. Open the Resource Console, and click the Resource Hierarchies button. 2. Click the Add button to create a default content hierarchy for the contents.

VIP Note 18 – VIP Personalization Connector for WebSphere

22

Using the WebSphere Personalization Resource Console

Fig. 6 – Creating a Resource Hierarchy in the Resource Console

3. Specify the following settings as shown below:

n Hierarchy Name: VipHierarchy n What is the Resource Collection for this hierarchy? VipContent n Specify a Root Node Name: VipRoot n Where should the Resource Console store dynamic properties? Personalization database 4. Click the Create Hierarchy button to create the content hierarchy.

VIP Note 18 – VIP Personalization Connector for WebSphere

23

Using the WebSphere Personalization Resource Console

Fig. 7 – The created hierarchy

VIP Note 18 – VIP Personalization Connector for WebSphere

24

Using WebSphere Studio

Using WebSphere Studio Creating resources For each resource collection that you have created using the Resource Console, you have to create a resource hierarchy file. This must be done manually. Proceed as follows: 1. Right-click the resources folder in WebSphere Studio Personalization window, and select Insert → Folder. This folder structure will be your package name. Use the package hierarchy as you have done for the resource classes. In this case, it will be de. gauss. vip. cmpi .i bm. After inserting the folder, you can create a resource hierarchy file. 2. Copy an existing hierarchy file (any file provided with the sample) and paste it into the ibm folder by right-clicking it and selecting Paste. 3. Rename this file by right-clicking it and selecting Rename. Its new name should be Vi pHier ar chy. hrf . 4. Edit the file by right-clicking it and selecting Edit with Notepad. As it is an XML file, it should be as follows: content de.gauss.vip.cmpi.ibm.VipResourceManager de.gauss.vip.cmpi.ibm.VipResourceDomain de.gauss.vip.cmpi.ibm.VipResource Content de.gauss.vip.cmpi.ibm.VipResourceManager de.gauss.vip.cmpi.ibm.VipResourceDomain

VIP Note 18 – VIP Personalization Connector for WebSphere

25

Using WebSphere Studio

de.gauss.vip.cmpi.ibm.VipResource

Change the corresponding values for ResourceClass, ResourceDomainClass and ResourceManagerClass according to the file shown above. 5. After editing the file, check it in and publish it.

VIP Note 18 – VIP Personalization Connector for WebSphere

26

Rules, Classifiers and Actions

Rules, Classifiers and Actions The following section gives you a short overview of the relation between rules, classifiers, and actions. For more detailed information, refer to the WebSphere documentation. A rule is created by using classifiers and actions. Classifiers define a set of circumstances or conditions related to a website visit that are evaluated if a web page is displayed. Depending on whether the conditions apply or not, different actions can be used to select the content to be displayed on a web page.

Example In this example, users are classified according to roles. The user can be an executive, a manager or an employee. Several classifiers exist according to this classification: If the user’s role is “Executive”, the user is classified as Exec. If the user’s role is “Manager”, the user is classified as Manager. If the user has a different or no role, he is classified as Employee. The four actions involved are defined as follows:

n GetContents4Admin.act – If this action is invoked, the contents of which “admin” is the author will be retrieved.

n GetContents4Date.act – If this action is invoked, the contents with a creation date older than the specified to_date value will be retrieved.

n GetContents4SuffixHtm.act – If this action is invoked, the contents with the suffix “.htm” will be retrieved.

n OtherwiseContent.act – If this action is invoked, the contents with the name “not_found” will be retrieved. The rule userContents.rul is used to combine these four actions and the classifiers. If the user is classified as Exec, the GetContents4SuffixHtm.act action is invoked. If the user is classified as Manager, the GetContents4Admin.act action is invoked, and if the user is classified as Employee, the GetContents4Date.act action is invoked. If the user is neither classified as Exec, Manager or Employee, the OtherwiseContent.act is invoked.

VIP Note 18 – VIP Personalization Connector for WebSphere

27

Rules, Classifiers and Actions

In the following table, the relation of classifiers, actions, and rules of the above example is summarized: Name

Actual query

Classifier VipUserRole.clf

If( currentPersonnel.ROLE = Executive ) VipUserRole = Exec; Elseif( currentPersonnel.ROLE = Manager ) VipUserRole = Manager; Else VipUserRole = Employee;

Actions GetContents4Admin.act

Select content of which author = ‘admin’

GetContents4Date.act

Select content in which creation date < to_Date(‘MM/dd/yyyyy HH:mm:ss z’, ’05/01/ 2000 12:12:12 GMT +2.00’) ;

GetContents4SuffixHtm.act

Select content in which suffix = ‘.htm’

OtherwiseContent.act

Select content in which name = not_found

Rule UserContents.rul

If( VipUserRole is Exec) do GetContents4SuffixHtm.act; If( VipUserRole is Manager) do GetContents4Admin.act; If( VipUserRole is Employee) do GetContents4Date.act If( VipUserRole is Otherwise) do OtherwiseContent.act

This rule can be directly used in a JSP file to retrieve the personalized contents from the VIP CM system. Each WebSphere IBM Studio project contains a special r ul es folder for its Personalization classifiers, actions, and rules. As rules do not belong to any specific project or website but are generally used in WebSphere Application Server, it is essential to give each rule a unique name to prevent overwriting and conflicts.

VIP Note 18 – VIP Personalization Connector for WebSphere

28

Rules, Classifiers and Actions

Another way to avoid this problem is to use project-specific subfolders below the r ul es folder. The folder structure will become part of the package name when the rules are compiled. This ensures that they are not duplicated. To facilitate your workflow, IBM WebSphere Studio provides a r ules folder in each project. Below this folder there is a subfolder with the project name, and below this subfolder there are acti on and cl assi fi er subfolders for your actions and classifiers. If you create rules and compile them, IBM WebSphere Studio recreates the same folder structure within the ser vlet folder. Note: The .clf files are in the classifiers folder, and the .act files are in the actions folder.The .rul files are in the Personalization folder, and all the associated class files are in a similar structure below the servlet folder.

VIP Note 18 – VIP Personalization Connector for WebSphere

29

Personalizing VIP Content

Personalizing VIP Content In this section, the necessary steps are explained to retrieve personalized content from the VIP CM system. 1. You have to define the classifiers for the rules. Every classifier consists of a set of variables (e.g. Classification, Resource.Attribute, is_equal_to, value, add_Condition, add_Classification, etc.) which have to be set to define the appropriate conditions of a website visit. The classifier file extension is . clf. 2. The actions for the rules have to be defined. As every action also contains several variables (e.g. Resource.Attribute, is_equal_to, value, add_Condition, sort_by), they have to be set according to the content that is to be selected on the web page. In the following table, you will find attributes to be used for the definition of actions. Attribute

Description

name

Filters VIP objects by title

url

Filters VIP objects by URL

lastModifiedDate

Filters VIP objects by the release date

lastModifiedBy

Filters VIP objects by the VIP user who released the object

author

Filters VIP objects by the VIP user who created the object

creationDate

Filters VIP objects by the date of creation

topic

Filters VIP objects by parent topic

comments

Filters VIP objects by the “keywords” metadata

identifier

Filters VIP objects by OID

version

Filters VIP objects by version number

subtitle

Filters VIP objects by “heading” metadata

VIP Note 18 – VIP Personalization Connector for WebSphere

30

Personalizing VIP Content

Attribute

Description

description

Filters VIP objects by the “description” metadata

suffix

Filters VIP objects by suffix (e.g. “.html” or “.gif”)

targetGroup

Filters VIP objects by target group

3. The rules have to be built. They are created by using the defined classifiers and actions. 4. The rules are implemented in a JSP file to directly retrieve the personalized content from the VIP CM system. Note: For more information about creating, publishing, checking in, and compiling classifiers, actions, and rules, please refer to the WebSphere documentation.

Classifier description and examples In the following table, you will find a description of the keywords used in the example classifier file listed below. Keywords in XML file

Description

type

Specifies whether the type is an action, a classifier or rule

contextId

Classifier name (including the package name)

classification

User name

beanName

Output data type

resourceHierarchy

Name of the resource hierarchy

operation

Operation to be processed i.e. the relational operator

propertyName

The property to be compared

propertyType

Fixed or dynamic

VIP Note 18 – VIP Personalization Connector for WebSphere

31

Personalizing VIP Content

Keywords in XML file

Description

propertyTypeJava

Property data type

pznContextId

Property name for the user ID i.e. pzn.user

value

Property value

In the following section, the XML file of the classifier VipUserRole.clf is shown. This classifier is used to classify three different user roles, i.e. “Exec”, “Manager”, and “Employee”. For more information about this classifier and its use in a rule, refer to section “Rules, Classifiers and Actions” starting on page 27. VipUserRole.clf Executive Manager

Action description and examples In the following table, you will find a description of the keywords used in the example action files listed below. Keywords in XML file

Description

type

Specifies whether the type is an action, a classifier or rule

contextId

Action name (including the package name)

outputType

Output data type

resourceHierarchy

Name of the resource hierarchy

beanName

Output data type

operation

Operation to be processed, i.e. the relational operator

propertyName

The property to be compared

propertyType

Fixed or dynamic

propertyTypeJava

Property data type

value

Property value

On the following pages, you will find several action example files.

VIP Note 18 – VIP Personalization Connector for WebSphere

33

Personalizing VIP Content

GetContents4Admin.act This action is invoked to retrieve content of which “admin” is the author. For more information about this action and its use in a rule, please refer to section “Rules, Classifiers and Actions” starting on page 27. admin

GetContents4SuffixHtm.act This action is invoked to retrieve the content with the suffix “.htm”. For more information about this action and its use in a rule, please refer to section “Rules, Classifiers and Actions” starting on page 27. .htm

GetContents4Date.act This action is invoked to retrieve the content with a creation date older than the to_Date value. For more information about this action and its use in a rule, please refer to section “Rules, Classifiers and Actions” starting on page 27. to_Date('MM/dd/yyyy HH:mm:ss z', '05/01/2000 12:12:12 GMT+2:00')

VIP Note 18 – VIP Personalization Connector for WebSphere

35

Personalizing VIP Content

Otherwise.act This action is invoked to retrieve the content with the name “not_found”. For more information about this action and its use in a rule, please refer to section “Rules, Classifiers and Actions” starting on page 27. not_found

Rule description and example In the following table, you find a description of the keywords used in the rule file example listed below. Keywords in XML file

Description

contextId

Rule name (including the package name)

outputType

Output data type

classifier name

Name of the classifier which is used to create this rule

VIP Note 18 – VIP Personalization Connector for WebSphere

36

Personalizing VIP Content

Keywords in XML file

Description

classifications operation

Logical or Boolean operators to create composite classifiers

classification field

Name that is used to identify the classifier

action name

Name of the action which is used to create this rule

On the following page, the XML file of the UserContents.rul rule is shown. This rule combines the VipUserRole.clf classifier with the four actions GetContents4Admin.act, GetContents4Date.act, GetContents4SuffixHtm.act, and OtherwiseContent.act, thus presenting personalized content according to the user’s role. For more information about this rule and its use, please refer to section “Rules, Classifiers and Actions” starting on page 27.

UserContents.rul This rule uses the following actions, classifiers and classifier packages: Actions

GetContents4Date, GetContents4Admin, GetContents4SuffixHtm, OtherwiseContent

Action package

de.gauss.vip.cmpi.ibm.actions

Classifiers

VipUserRole

Classifier package

de.gauss.vip.cmpi.ibm.classifiers