WCM Menu without duplicate records

Menu results may contain several results that represent the same piece of content.

Menu results are not unique, Menu results may include multiple results representing the same piece of content as the results can include content and content links.

For example, several content links to the same content may appear in the results for a single menu. It may be desirable to filter these duplicate results, to leave only one.

Following configuration property used to define whether menus should allow duplicate results. If the property is set to false, duplicates will be filtered from the menu results prior to rendering.

The property can be set either at a global level or a per-request level:
  1. To configure the global setting (for all menus), set the following in WCMConfigService.properties:
           menu.allowDuplicateResults=false   (true/false).
  2. To override the global setting, add a request parameter to the request that renders the menu:
           allowDuplicateResults=false   (true/false).

NOTE:
  1. Limitation - Duplicate results will only be filtered when the menu cache is active. If duplicate results appear in menus even though the allowDuplicateResults property has been set to false, increase the value of the menu.cache.max.items property in WCMConfigService.properties to ensure the menu cached it being
    utilized.
  2. "menu.cache.max.items" setting is different from the "services/cache/iwk/menu" , I mean "services/cache/iwk/menu" max size by default 2000, but "menu.cache.max.items" determines how many items in each entry can hold.

Example Scenario
  1. Sitearea "S1-Parent" has following children i.e. content items (c1, c2, c3 ) and sub sitearea called "S1-child"
  2. Sitearea "S1-child" has following children i.e content links (c1-L, c2-L, c3-L) and content(c4)
  3. Have menu component(974b4472-c924-414e-9d98-1103f48e417c) to iterate based on the sitearea (checked the option to include all descents)



Sample URL: Menu pointing to S1-Parent (checked the option to include all descendant's)

Result
C1, C2, C3, C1-L, C2-L, C3-L, C4

URL: Menu pointing to S1-Parent (checked the option to include all descendant's) but allowduplicateresults is false

Result
C1, C2, C3, C4

URL: Menu pointing to S1-Child (checked the option to include all descendant's)

Result
C1-L, C2-L, C3-L, C4

Disable content links in Menu Components completely

To disable the content links completely in the menu components , set the following configuration i.e
menu.includeContentLinks=false  in the WCMConfigService.properties.

URL: Menu pointing to S1-Parent(checked the option to include all descendant's)

Result
C1,C2,C3,C4

URL: Menu pointing to S1-Child(checked the option to include all descendant's)

Result
C4


Ref:

  1. http://www-01.ibm.com/support/docview.wss?uid=swg1PK72350
  2. http://www-01.ibm.com/support/docview.wss?uid=swg1PK64684

WSRP Part4 - WCM Local Rendering vs WCM Remote Rendering


WCM Local Rendering


WCM Remote Rendering

How to setup
To display web content on a portal that does not have IBM® Web Content Manager installed, you can use the JSR 286 web content viewer and the portal's WSRP support. 
NOTE:
  1. Any resources required by the web content viewer, must be available on the remote web content server acting as the WSRP Producer ,
    1. resource bundle files,
    2. context processor plug-ins,
    3. JSP components (Any WCM API code)
    4. Personalization Rules,

 When to use this approach:

If the site that has very little web content on its pages and is mainly driven by other applications rendered on the page. For those scenarios it may make sense to manage the WCM environment separate from the portal environment.

Why one would want to have an application being remote (in general , not specific to WCM):
  1. off-load CPU intensive applications
  2. off-load memory intensive applications
  3. provide a sandbox for applications that are not thoroughly tested by IT infrastructure
  4. the application is not maintained by IT infrastructure, but another party in the organization or outside the organization
  5. a SOA infrastructure that has the applications and its content hosted in different parts of the organization


Limitations when using WSRP with the web content viewer: 

  • Because the concept of pages and Web content pages does not exist in WSRP, you cannot use the dynamic link broadcasting feature with web content pages. When specifying how links should be broadcast, do not select Dynamically select a web content page in the Broadcast links to field. Selecting this option has the same effect as broadcasting links to the current page.
  • Friendly URL formation using the sitearea is not possible
  • WSRP is really a protocol to embed remote running applications and not well suited for rendering complete pages remotely. It therefore has no support for any aggregation concept, like links to other pages or other resources outside of WCM.
  • The use of authoring tools components or remote authoring action URLs in your web content is not supported with WSRP.
  • All tagging and rating features for web content are not supported with WSRP.
  • Personalization elements using selection rules based on the federated documents resource collection cannot be used with WSRP.
  • In most cases you also want to have the access control set consistently for the portal pages and the web content, which would require additional work in the remote case. 

WCM and WebSphere Portal getting tightly coupled in future releases (in V8.0 , to allow portal page syndications, projects …etc) and these additional features which likely will only be available in the locale rendering scenario.
Benefits of this approach
This result in lower license costs for WCM, but has other infrastructure costs due to the added complexity of managing the remote scenario and the need for more hardware, as the remote calls add additional overhead. 


Overall Comparison

WCM Remote Rendering
WCM Local Rendering
WCM Request throughput
Lower volume of requests
Higher volume of requests
Portal Request throughput
Higher volume of requests
Lower volume of requests
Total (WCM and Portal) Request throughput
Higher volume of requests
Lower volume of requests
Cost
Less Web Content Manager licenses required
More Web Content Manager licenses required
Dynamic Linking using Web Content Pages
No
Yes
Mobile Portal Accelerator support
No
Yes
Tagging and Rating support
No
Yes
WCM Authoring Tools (ie. Inline Edit) support
Yes, but requires custom building of inline-edit URLs to redirect back to remote WCM server. See
Yes
WCM Basic Cache Support
No
Yes
WCM Advanced Cache Support
Yes
Yes
Upgrade Web Content Manager independent of WebSphere Portal
Yes
No
WSRP (For rendering content)
Yes
No
Web Content Manager can be placed behind a firewall
Yes, but only when redirection is set up and fully qualified URLs are disabled
No
Web Content Manager CPU activity on delivery portal nodes
Low
High
Complexity of administration
More servers to administer
Less servers to administer
Network traffic
Because the path is longer, the network congestion is higher
Less network activity
System CPU requirement
Less CPU speed required (as you have two servers, one for Portal and another for WCM)
Higher CPU speed required (as you have a single server for both WCM and Portal)
Additional Security configuration required
Yes (for authentication between Portal and WCM server
No
Location and execution of WCM JSP Components
Remote WCM Server
Local WCM Server
Location and execution of PZN Rules
Remote WCM Server
Local WCM Server
Tuning required
Yes
Yes

One line summary: Only use remote rendering after careful consideration of all the limitations and implications, if in doubt use local rendering .
References
  1. http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Web+Content+Manager+7+Product+Documentation#action=openDocument&res_title=Performing_remote_rendering_with_WSRP_and_the_JSR_286_web_content_viewer_wcm7&content=pdcontent
  2. http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Local_and_remote_rendering_with_Web_Content_Management_7.0
  3. http://www-10.lotus.com/ldd/portalwiki.nsf/dx/local-and-remote-rendering-with-web-content-management

WSRP Part3 - Legacy Remote Rendering Portlet (IBM remote rendering portlet)


  1. Legacy Remote Rendering Portlet
    1. Initially I had confusion regarding the remote rendering portlet (ilwwcm-remoterendering-portlet.war) vs exposing JSR 286 content viewer portlet as WSRP.
    2. A remote rendering portlet can be used to display content within a portlet located on a different portal server than the instance of WebSphere Portal on which WCM is installed. A remote rendering portlet can be installed on WebSphere Portal versions 5.1, 6.0, or 6.1.
    3. But with WPS v7 onwards , remote rendering portlet is not installed by default and is available in the installableApps for the backward compatibility or for the migration purposes (C:\IBM\WP7\WebSphere\PortalServer\installableApps\ilwwcm-remoterendering-portlet.war).
    4. If we want to use the remote rendering process use the JSR 286 viewer with WSRP for better features and support.


Reference
2. Remote Rendering migration steps

WSRP Part2 - Remote Rendering - Configuring Consumer Portal and Consuming Portlet


1.      Setting WSRP Consumers
a.      Information Exchange checklist is same as producer portal.
b.      Security Configuration :
                                i.          It is similar to producer security configuration
                               ii.          Make sure to configure the "wsrp.security.enabled" to false as in producer config, if you don't want configure the security otherwise you get the error while creating the producer definition.
                              iii.          In addition , You can configure Portal Access Control for the WSRP services that you consume as remote portlets on your Consumer portal. When you consume WSRP services from a Producer portal in you Consumer portal, these remote portlets behave just like local portlets in your portal. You can assign access permissions to users on these portlets by using Portal Access Control.

c.      Producer Definition
                                i.     Types of Producer Definitions
      1. The Producer does not require registration.(can create either in online or offline mode)
      2. The Producer requires registration and is enabled for WSRP registration. In this case the Producer provides a registration port. (can create only in online mode)
      3. The Producer requires registration and is not enabled for WSRP registration. In this case you need to provide a registration handle that you obtained from the Producer. (can create either in online or offline mode).
                               ii.     Create Producer Definition
      1. Using Web Service Configuration portlet

  




2.      Using XML configuration interface : more details on this can found in info center (refer the links in references section)

                              iii.          Consuming the portlets
                                              1.          From the manage web modules portlet
                                                             a.          Click on the "consume"






To validate if the consumed portlet is available click on "monitor" icon in above screen.

Add the consumed WCM JSR 286 content viewer portlet on the page and configured the portlet


Configuring the portlet edit shared settings

NOTE: Just for testing and to make security setup simple I have disabled the wsrp security initially , but because of this I had to add the "anonymous portal users" access to the library to access the content from the producer portal .

                              iv.          NOTE:
                                              1.          Offline mode comes into picture when you want to create consumer in Staging environment but do not want to connect to prod until move to prod)
                                              2.          The current implementation of the WSRP Producer in the portal does not support the WSRP registration interface
                                              3.          you cannot use the Web Services Configuration portlet to perform the following tasks:
                                                             a.          Provide Web services: To provide your portlets and make them available to other portals as remote Web services, use the Manage Portlets portlet.
                                                             b.          Consume Web services: To integrate Web services provided by a Producer as remote portlets in your portal, use the Manage Web Modules portlet.

d.      Exporting customized portlets instances


References
1.      Using your portal as consumer
2.      Creating producer definition


WSRP Part1 - Remote Rendering - Configure Producer Portal & Providing Portlet


a.      Accessing/generating service WSDL file in Producer portal
                                i.     Producer portal needs to provide WSRP service WSDL URL to consumer , generally URL will be like

For my local
Or

<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:v1bind="urn:oasis:names:tc:wsrp:v1:bind" xmlns:v2bind="urn:oasis:names:tc:wsrp:v2:bind"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://www.ibm.com/xmlns/prod/websphere/portal/wsrp/wsdl">
<import namespace="urn:oasis:names:tc:wsrp:v2:bind" location="wsrp-2.0-bindings.wsdl"/>
<import namespace="urn:oasis:names:tc:wsrp:v1:bind" location="wsrp_v1_bindings.wsdl"/>
<wsdl:service name="WSRPService">
<wsdl:port binding="v1bind:WSRP_v1_Markup_Binding_SOAP" name="WSRPBaseService">
<soap:address location="http://sivapc.sivavaka.com:10057/wsrp/WSRPBaseService"/>
</wsdl:port>
<wsdl:port binding="v1bind:WSRP_v1_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService">
<soap:address location="http://sivapc.sivavaka.com:10057/wsrp/WSRPServiceDescriptionService"/>
</wsdl:port>
<wsdl:port binding="v1bind:WSRP_v1_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService">
<soap:address location="http://sivapc.sivavaka.com:10057/wsrp/WSRPPortletManagementService"/>
</wsdl:port>
</wsdl:service>
<wsdl:service name="WSRPService_v2">
<wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP" name="WSRPBaseService">
<soap:address location="http://sivapc.sivavaka.com:10057/wsrp/WSRPBaseService_v2"/>
</wsdl:port>
<wsdl:port binding="v2bind:WSRP_v2_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService">
<soap:address location="http://sivapc.sivavaka.com:10057/wsrp/WSRPServiceDescriptionService_v2"/>
</wsdl:port>
<wsdl:port binding="v2bind:WSRP_v2_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService">
<soap:address location="http://sivapc.sivavaka.com:10057/wsrp/WSRPPortletManagementService_v2"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

From <http://sivapc.sivavaka.com:10057/wps/wsdl/wsrp_service.wsdl>
Consumer uses these WSRP SOAP URL's to access the
producer.protocol://host_name:port_number/wsrp_context_root/wsrp_port_name
i.e http://sivapc.sivavaka.com:10057/wsrp/WSRPServiceDescriptionService_v2


                               ii.          WSRP1.0 vs WSRP2.0
                                              1.          WP7 and above supports both WSRP version 1.0 and 2.0
                                              2.          JSR168/IBM Portlets supports both WSRP 1.0/ 2.0
                                              3.          JSR286 portlets supports WSRP 2.0
                              iii.          You can change this WSDL file settings using different ways as below and it uses the fallback approach
                                              1.          url parameters

                                              2.           Settings in the portal Config Service
                                              3.          Values from the incoming request

a.      Configuring the security
                                i.     Configure security using the WS-Security (webservice security) : This requires to update and re-pacakage the wps war file.
                               ii.     Configure security using the SSL client certificate :
                              iii.     Disable the security (You can't use the portal access control settings) : By default Portal Access Control is enabled for the Producer portal. If you want to disable Portal Access Control when using WSRP with WebSphere Portal, deactivate the WSRP security by setting the portal configuration parameter wsrp.security.enabled in the portal Config Service to false. With this setting all portlets that your Producer portal provides can be accessed through the WSRP protocol without any authentication.

b.     Producer checklist for exchanging the information between consumer.
                                i.     The WSDL document that contains the WSRP service description of the Producer.
                               ii.     security information (if producer portal has security setup done)
      1. user registry information. The Consumer needs this in most cases if the Producer has configured security by using WS-Security token forwarding. 
      2. SSL server certificate.The Consumer needs this if the Producer portal has security set up with SSL client certificate authentication. 
                              iii.     Registration information. The Consumer needs this if the Producer requires registration. 
                              iv.     Group IDs and handles of portlets. The Consumer needs these if the Consumer administrator consumes a WSRP service from a Producer portal by using the XML configuration interface.
The portlet handle and group ID are listed in the service description of the Producer. The portlet handle for each portlet that the Producer provides is listed in a portletHandle tag. The group ID for each portlet that the Producer provides is listed in the groupID tag of the service description.

c.      Providing Portlets (providing WSRP services as producer) :
                                i.     To provide or withdraw a portlet for WSRP services, you can use either of the following options:
      1. Using Manage Portlets.
a.      Provide Portlet


b.      Withdraw portlet
2.      Using XML configuration interface, more details on this can found in info center (refer the links in references section)
NOTE
                                i.     When a Producer provides a portlet, the portlet itself is provided, not an instance of it. Therefore only settings made in the Configure mode of the portlet are available at the consumed remote portlet. Adding a remote portlet to a page on the Consumer side creates a new instance of the provided portlet on the Producer side. But this instance can only be modified on the Consumer and is not visible on the Producer portal.
                               ii.     Customization of the Producer portlets by Consumer portal users can be exported by using the XML configuration interface.
                              iii.     The current implementation of the WSRP Producer in the portal does not support the WSRP registration interface
                              iv.     you cannot use the Web Services Configuration portlet to perform the following tasks:
      1. Provide Web services: To provide your portlets and make them available to other portals as remote Web services, use the Manage Portlets portlet.
      2. Consume Web services: To integrate Web services provided by a Producer as remote portlets in your portal, use the Manage Web Modules portlet.


References
a.      Customizing the WSRP configuration of your Producer portal