Tuesday, October 8, 2013

Extending WebCenter Portal 11.1.1.8 Made Easy

If you had a chance to extend WebCenter Spaces previous to 11.1.1.8 Portal release, you perhaps would agree - it was not that easy. Good news - with the latest WebCenter Portal 11.1.1.8 release, extending WebCenter Portal process became simpler and more stable. There is special JDeveloper application template provided, designed to extend WebCenter Portal with custom ADF Task Flows and Java code. You can read more about it in WebCenter 11.1.1.8 Developer guide here. Check how complicated it was to extend WebCenter Spaces before - What Else Can Go Wrong when Extending WebCenter Spaces.

Application template name to extend WebCenter Portal - WebCenter Portal Server Extension:


Based on this template, you can create new JDeveloper application, with two projects included - PortalExtension and PortalSharedLibrary. PortalExtension project could include any custom code you deploy. However, most of the time you will attach your custom ADF Libraries to the PortalSharedLibrary project. Simply you would need to add your custom library name into weblogic.xml file:


PortalSharedLibrary project deploys extend.spaces.webapp shared library to the WebCenter Portal server. WebCenter Portal itself is referencing extend.spaces.webapp shared library. This library acts as proxy, it is empty, there is just weblogic.xml file with a list of our custom libraries to be referenced. You should deploy extend.spaces.webapp library to the WebCenter server as a shared library (don't forget to restart it afterwards):


Make sure to increase extend.spaces.webapp library version, before deploying - it must be greater than currently deployed one:


Your custom library should be deployed separately on the server, this library is referenced from proxy extend.spaces.webapp library weblogic.xml. I was deploying custom library as shared library, using sample application from my previous blog post - Deploying ADF Applications as Shared Libraries on WLS:


New version of extend.spaces.webapp library is deployed, referencing redsamurai.shared.lib:


To test newly added custom ADF Task Flow, you need to make sure ADF Security permission is set first, otherwise ADF Task Flow will not be visible. Login to EM and grant security permission, in this example ADF Task Flow for employees is granted with authenticated role:


Once security permission is assigned, custom ADF Task Flow for employees becomes visible from the library catalog and can be added to WebCenter Portal resource catalog:


It can be consumed in the WebCenter Portal page editor (formely - Composer):


Employees data is rendered inside WebCenter Portal through custom ADF Task Flow:


Here you can download - webcenter_extend_ps7.zip example with WebCenter Portal Server Extension application, including custom library reference. Shared library deployment application is packaged into sample application as well, this one is taken from my previous blog post mentioned above.

No comments: