Showing posts with label administerpersonalization. Show all posts
Showing posts with label administerpersonalization. Show all posts

Publishing personalization rules over SSL

By default the personalization rules are published on HTTP, but if you want you can change this to use Secured connection. If you decide to use the secured connection then you will have to make following configuration changes so that the authoring system can connect to run-time system on secured port. Follow these steps to do that

1. Export the SSL certificate from the trust store of your publish server's Web server (see the WebSphere Application Server InfoCenter for help using the keytool utility for importing and exporting SSL certificates).
2. Stop the authoring server.
3. Import the SSL certificate into the WebSphere Application Server trust store on the authoring server (by default, this is located at /java/jre/lib/security/cacerts). If your authoring server is configured to use an external Web server, you must also import the SSL certificate into the Web server's trust store.
4. Start the authoring server. The authoring server should be able to make SSL-encrypted HTTP connections and successfully publish data to the Personalization server.

Once the trust is enabled, you can change the URL of the run-time system that your using either in the Personalization Navigator Portlet or using pznload.sh command to use the https as protocol and correct port number.

If a Personalization server is configured to use a non-standard HTTPS port or context root, or if you see messages such as EJPVP20002E: The local publish service was not available when publishing from the authoring environment, the local publish servlet URL might be incorrect.
To specify the correct URL for the local publish server:

1. From the Portal Administration page, select Portlet Management > Portlets.
2. Locate the Personalization Navigator portlet in the list.
3. Click Configure portlet to configure the portlet.
4. Add a new portlet parameter whose name is pzn.publishServlet.url and specify the appropriate value.

Publishing Personalization rules

Portal server supports the ability to author rules and campaigns on one system and publish them to other systems. System where rule is authored is called authoring system and system where rules are published is called run time system. When you author rules using Personalization Navigator + Personalization Editor portlets those rules get stored in the JCR database repository. At the time of executing these rules you need two things first is Java libraries to execute the rule as well as access to the JCR database where these rules are stored.

The process of publishing rules from authoring system to run-time system is a two step process, first you export the rules from authoring system into an xml file and then you import that xml file on the target system. Please note that the XML file that contains the personalization rules in not xmlaccess file instead it has different format. Take a look at the sample file on my machine


As you can see this file is not a regular .xml file instead it has some binary data. So it is not possible to create an xml file manually and import it on run-time system to create rules. Instead you will have to author the rules on one system and follow export + import system

Publishing rules


WebSphere Portal Personalization sends published objects across HTTP to a servlet which resides on each personalization server. This servlet can receive publishing data or initiate new publishing jobs. When a user begins a publishing job from the personalization authoring environment, the local servlet is provided with the set of information necessary to complete the job. The local servlet contacts the destination endpoint servlet (which could be the same servlet) and sends its data to it. The destination servlet reports success or failure.

To begin publishing personalization objects, you create an object in the authoring environment which describes the target endpoint.The server requires one field, which is the URL associated with the publish servlet for that endpoint. The publish server may also define which workspace will receive publishing data. Personalization operates in the default Content Manager run-time edition workspace after installation. If the target workspace field is empty, then the publish server uses the default workspace. (You need to set the workspace field if you are configuring scenario three described above.)

The last option is whether or not to delete remote objects that have been deleted on the local system. The default is Smart Delete, which simply removes items that are no longer present. If you do not have delete permission on the remote server you could select the Leave deleted resources on server option.

After you create a publish server, you can publish either the entire workspace or a set of objects within it. You specify either of these options by selecting the More Actions > Publish submenu




The Publish page displays what will be published. This page requires the user to choose a destination publish server and any necessary authentication information. If the remote system is secured and is not a member of the current server’s Single Sign-On domain you can enter a user name and password in the provided fields. The values for user and password are stored in the WebSphere Portal credential vault and are not accessible to any other user.Click Publish to launch the publish job.If the local system is able to locate and authenticate with the remote publish server, you are returned to the main navigator view, and you see the Personalization message EJPVP20001I at the top of the portlet. Then, the publish job runs as a background process on the local server. Click the View the details of this job link to open the publish status window to see information about the progress and success or failure of the publish job.

PersonalizationService.properties

The PersonalizationService.properties file allows you to configure how the personalization rules engine works. It is located in
wp_profile\PortalServer\config\config\services

You can change PersonalizationService.properties to define things like how the Personalization related objects are cached, what happens if there is an error in executing the personalization rule,..

Important NoteThe PersonalizationService.properties file is not managed by the Deployment Manager so if you make any changes in it in the clustered environment then you should copy it manually to all the servers in the cluster


##################### Multiple lines of production #####################

# The workspace name for rules engine.
# (optional)
#
# Use this parameter if you have multiple lines of
# production sharing a JCR repository
# (shared JCR database domain)
#
# Each line of production may then have its own rules workspace
# each with different set of active rules, much like each line
# of production may have a different WPS configuration db domain.
#
rulesRepository.rulesWorkspace=RULESWORKSPACE

########################################################################

##################### Exception handling #####################

# Runtime exception handling method
#
# Options include:
#
# ignore
# Exceptions are ignored. Not supported in production environments.
# Ignoring exceptions will give no diagnostic information in case of error.
#
# logMessage_stdout
# logMessage_stderr
# logMessage_stdout_rethrow
# logMessage_stderr_rethrow
# logStackTrace_stdout
# logStackTrace_stderr
# logStackTrace_stdout_rethrow
# logStackTrace_stderr_rethrow
# logMessageAndStackTrace_stdout
# logMessageAndStackTrace_stderr
# logMessageAndStackTrace_stdout_rethrow
# logMessageAndStackTrace_stderr_rethrow
# rethrow_exception
#
rulesEngine.exceptionHandling=logStackTrace_stderr

# Specifies what occurs when an object is not found by Personalization.
# This may occur when Personalization cannot find the current user or
# when an expected application object does not exist on the session or
# request at the expected key.
#
# When false, a null user (or any other null object) is not treated
# as an error but is instead only printed to the logs as a warning.
# Personalization will continue as if the requested attribute
# of the null object is itself null.
#
# For instance, if no user object is found, a rule such as
# 'Show page or portlet when user.name is null'
# would return 'show' if rulesEngine.throwObjectNotFoundException
# is false. A null user is treated as if the user.name is null.
# On the other hand, if 'rulesEngine.throwObjectNotFoundException' is
# true, this same rule would throw an exception if the user object was
# not found.
#
# If this rule was used to determine the visibility of a page or portlet,
# the ultimate result would depend upon the value of
# 'rulesEngine.visibilityDefault', which is 'hide' by default.
#
rulesEngine.throwObjectNotFoundException=false

# Specifies a class which is called following processing of the
# rule but prior to returning the results.
#
#rulesEngine.defaultRuleExit=

########################################################################

##################### Cache control #####################

# Cache control settings
#
# cache.enabled
# Globally specifies whether cache is enabled or disabled.
#
# cache.jndiName
# Globally specifies a cache to use.
#
# cache.maxEnumSize
# Globally specifies the maximum number of entries in each
# cached enumeration. Enumerations which exceed this number
# will not be cached. -1 indicates no limit.
#
# Optionally, the above parameters may be configured for each
# resource collection.
#
# cache.timeout
# Globally specifies the cache timeout.
#
# cache.priority
# Globally specifies the cache priority.
#
rulesEngine.cache.enabled=true
rulesEngine.cache.jndiName=services/cache/pzn/general
rulesEngine.cache.maxEnumSize=-1
rulesEngine.cache.timeout=300
rulesEngine.cache.priority=1

rulesEngine.cache.enabled.ibmpznnt:rule=true
rulesEngine.cache.jndiName.ibmpznnt:rule=services/cache/pzn/rules
rulesEngine.cache.maxEnumSize.ibmpznnt:rule=-1
rulesEngine.cache.timeout.ibmpznnt:rule=300
rulesEngine.cache.priority.ibmpznnt:rule=1

rulesEngine.cache.enabled.ibmpznnt:campaign=true
rulesEngine.cache.jndiName.ibmpznnt:campaign=services/cache/pzn/campaigns
rulesEngine.cache.maxEnumSize.ibmpznnt:campaign=-1
rulesEngine.cache.timeout.ibmpznnt:campaign=300
rulesEngine.cache.priority.ibmpznnt:campaign=1

rulesEngine.cache.enabled.ibmpznnt:ruleMappings=true
rulesEngine.cache.jndiName.ibmpznnt:ruleMappings=services/cache/pzn/ruleMappings
rulesEngine.cache.maxEnumSize.ibmpznnt:ruleMappings=-1
rulesEngine.cache.timeout.ibmpznnt:ruleMappings=300
rulesEngine.cache.priority.ibmpznnt:ruleMappings=1

rulesEngine.cache.enabled.ibmpznnt:resourceCollection=true
rulesEngine.cache.jndiName.ibmpznnt:resourceCollection=services/cache/pzn/resourceCollections
rulesEngine.cache.maxEnumSize.ibmpznnt:resourceCollection=-1
rulesEngine.cache.timeout.ibmpznnt:resourceCollection=300
rulesEngine.cache.priority.ibmpznnt:resourceCollection=1

rulesEngine.cache.enabled.ibmpznnt:applicationObject=true
rulesEngine.cache.jndiName.ibmpznnt:applicationObject=services/cache/pzn/applicationObjects
rulesEngine.cache.maxEnumSize.ibmpznnt:applicationObject=-1
rulesEngine.cache.timeout.ibmpznnt:applicationObject=300
rulesEngine.cache.priority.ibmpznnt:applicationObject=1

rulesEngine.cache.enabled.ibmpznnt:uuidPathConversion=true
rulesEngine.cache.jndiName.ibmpznnt:uuidPathConversion=services/cache/pzn/uuidPathConversions
rulesEngine.cache.maxEnumSize.ibmpznnt:uuidPathConversion=-1
rulesEngine.cache.timeout.ibmpznnt:uuidPathConversion=300
rulesEngine.cache.priority.ibmpznnt:uuidPathConversion=1

rulesEngine.cache.enabled.ibmpznnt:jcrNodeType=true
rulesEngine.cache.jndiName.ibmpznnt:jcrNodeType=services/cache/pzn/jcrNodeTypes
rulesEngine.cache.maxEnumSize.ibmpznnt:jcrNodeType=-1
rulesEngine.cache.timeout.ibmpznnt:jcrNodeType=300
rulesEngine.cache.priority.ibmpznnt:jcrNodeType=1

#rulesEngine.cache.enabled.=true
#rulesEngine.cache.jndiName.=services/cache/distributedmap
#rulesEngine.cache.maxEnumSize.=25

#
# Caching is enabled for the default Portal Document Resource Collection
# (/.personalization/collections/ibmpzn:dmDocumentCollection)
# the Web Content collection
# (/.personalization/collections/ibmpzn:wcmWebContentCollection)
# and disabled for the Portal User collection
# (/.personalization/collections/ibmpzn:wpsUser)
#
rulesEngine.cache.enabled./.personalization/collections/ibmpzn\:dmDocumentCollection=true
rulesEngine.cache.enabled./.personalization/collections/ibmpzn\:wcmWebContentCollection=true
rulesEngine.cache.enabled./.personalization/collections/ibmpzn\:wpsUser=false

########################################################################

##################### Scheduler / Rules events /E-mail campaigns #######

# Task configuration for rule events
# interval
# Specifies the amount of time (in seconds) between checking
# the repository for updates to rule events
# Default is 3600 seconds (1 hour)
#
# If this value is very short, it is possible that the scheduler will
# attempt to run before the server is finished starting. In this case,
# an email campaign may be unable to get its body content. This value
# should be sufficiently long to allow for the server start to complete.
#
scheduler.interval=3600
scheduler.workManager=wm/wpspznruleevents

# Configuration for Session for e-mail rules
# jndiName
# Specifies a jndi lookup name for the Mail Session.
# Configure your session using the WebSphere Application
# Server administrative console
#
email.session.jndiName=mail/personalizationMailSession

########################################################################

##################### Id Translator #####################

# Optional configuration for
# com.ibm.websphere.personalization.security.RegularExpressionSecurityTranslator
# The default pattern of
# ^.*(?:uid|UID|cn|CN)=([^,]+).*$
# and replacement pattern of
# $1
# will turn a user id such as
# uid=wpsadmin,o=default organization
# or
# cn=wpsadmin,o=default organization
# into simply
# wpsadmin
#
translator.pattern=^(?:uid|UID|cn|CN)=([^,]+).*$
translator.replacementPattern=$1

# Optional configuration for the port of the content
# server which serves the body of the e-mail messages.
email.contentServer.port=10040

########################################################################

##################### Portal User Collection #####################

# Use this configuration property to control which WMM properties show
# in the Personalization rule editor. wmm.property.hide will only
# hide those properties which are introspected from the WMM configuration.
wmm.property.hide=mobile,pager,roomNumber,secretary,carLicense,telephoneNumber,facsimileTelephoneNumber,seeAlso,userPassword,ibm-firstWorkDayOfWeek,ibm-alternativeCalendar,ibm-preferredCalendar,ibm-firstDayOfWeek,ibm-primaryEmail,ibm-otherEmail,ibm-generationQualifier,labeledURI,createTimestamp,modifyTimestamp,ibm-middleName,ibm-timeZone,initials,jpegPhoto,WCM\:USERDATA,groups

##################### Web Content Collection #####################

# Use this configuration property to control which WCM authoring
# templates show in the Personalization rule editor.
# The default is to show all authoring templates which have
# components which can be used in rules.
wcm.authoringTemplate.hide=
#Use this property to bypass the return of web content links in results
#rulesEngine.bypassWebContentLink=true

##################### Attribute Based Administration ###################

# Use this property to configure the root directory for Portal
# administration visibility rules (ROOT=/)
pickerRoot.com.ibm.portal.navigation=ROOT
# Default behavior if an error prevents a visibility rule from running (show/hide)
rulesEngine.visibilityDefault=hide
# Use this property to determine whether or not to cache the results of rules
# used in attribute based admin.
rulesEngine.attributeBasedAdmin.enableCaching=true
# Use this property to determine whether attribute based admin rules are evaluated
# in determining if navigational labels have children available.
rulesEngine.attributeBasedAdmin.verifyHasChildren=true

########################################################################

# Use this property to allow Personalization to edit rules larger than 32k in size.
# Rules edited while this is enabled cannot be read on systems older than Portal
# 6.1 without PK65714 installed.
rulesRepository.enableLargeRules=false

########################################################################


##################### Internal Use Only #####################

wcm.authoringTemplate.componentTypes.show=ibmcontentwcm:dateElement,ibmcontentwcm:shortTextElement,ibmcontentwcm:textElement,ibmcontentwcm:numericElement,ibmcontentwcm:optionSelectionElement
cm.property.hide=jcr:baseVersion,jcr:versionHistory,jcr:nodeType,jcr:isCheckedOut,ibmcontentwcm:name,ibmcontentwcm:classification
cm.property.hide.lotus\:collaborativeDocument=icm:categories,icm:expirationDate,icm:authors,icm:owners
cm.property.hide.clb\:clbDocument=icm:expirationDate,icm:authors,icm:owners
rulesEngine.publish.publishDocumentLibraries=false
pdm.documentHelper.class=com.ibm.websphere.personalization.pdm.Pdm60DocumentHelper