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.

4 comments:

Unknown said...

Very useful Andrejus, thank you.

One question:

If the taskflow contains custom BPM worklist and then we import task flow into webcenter application, will the bpm worklist appear within Webcenter?

Thanks,
Onkar

Andrej Baranovskij said...

I think, it should appear.

Andrejus

Anonymous said...

Very useful thank you!

I have problem when my custom taskflow is consuming a portlet. Everything works fine when running the taskflow on the integrated wls. But when i att the taskflow to a page using portalbuilder the portlet failes.

If i add the portlet directly to the page using portal builder everything works fine. Any idea where i should start looking to fix it?
The error in the log is "the metadata for portlet binding was not found in mds".

Jdev version 11.1.1.7
WCP version 11.1.1.8

Thanks,
Oskar

Upreti said...

Hi Andrejus,

I am using webcenter portal 11.1.1.8 using jdev 11.1.1.7 with portal extension. When I deployed your code in my webcenter spaces server I am unable to access my webcenter portal builder @
http://portal host:8888/webcenter

Then again I revert it back to old version and restarted server anyway I am able to get back my webcenter portal builder screen . Please suggest.

Regards,
Ramesh Upreti