Error Handling in attribute based administration

If there is an error finding or executing a rule assigned to a page or portlet, by default that page or portlet will be hidden. This behavior can be overridden globally by changing the value in the rulesEngine.visibilityDefault property, which is located in wp_profile_root/PortalServer/config/config/services/PersonalizationService.properties. Set the value of this property to show portlets or pages if an error occurs. This is particularly useful in development environments.
The property rulesEngine.throwObjectNotFoundException, also located in wp_profile_root/PortalServer/config/config/services/PersonalizationService.properties, specifies what happens if an object such as a user is not found when needed during rule execution. 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 set to false, a null user or 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 example, if no user object is found and rulesEngine.throwObjectNotFoundException is set to false, a rule such as Show page or portlet when user.name is null would return show. A null user is treated as if the user name is null. However, if no user object was found and rulesEngine.throwObjectNotFoundException is set to true, this same rule would throw
an exception. If this rule was used to determine the visibility of a page or portlet, the ultimate result would depend upon the value of the rulesEngine.visibilityDefault property, which would decide what occurs if an exception is thrown during processing of a rule in attributebased administration.

No comments: