WebCenter Portal .8: Extending portal functionality with ADF Taskflows


This blog entry will describe how to extend your portal functionality using a taskflow deployed as a web app shared library (extend.spaces.webapp) . The pros and cons of this approach will be discussed in a subsequent post however some of the implications of deploying your functionality as a shared library are:

  1. your taskflow will run in the same scope as the portal
  2. the portal and taskflow are tightly coupled

A dated A-Team discussion of the pros and cons can be found here. As additional background, there are several options available for adding functionality to your .8 WebCenter Portal.

The Development Process 

The .8 WebCenter Portal application (formerly referred to as Spaces) provides a mature and robust starting point for your portal application development. While Custom Framework is still available, the Portal application has many features that aren't available in a Custom Framework application. While the steps for extending portal functionality are documented, this post will describe my experience and some of the design decisions.

At a high level, you must do the following:

  1. Create an application in JDeveloper based on the WebCenter Portal Server Extension template.
  2. Develop your taskflow, managed bean or data control source in the Portal Extension Project OR register your Custom Web App Shared Libraries in the weblogic.xml of the Portal Shared Library Project
  3. Test your ADF source in JDeveloper
  4. Build, Package and Deploy the Portal Shared Library to the spaces server

Note: You MUST increment the PortalSharedLibrary Implementation Version defined in the MANIFEST.MF file. Failure to do so will generate an error when the spaces server is started preventing the application from running.

Creating the WebCenter Portal Server Extension Workspace 

The steps for creating the workspace are straight forward. The workspace will contain 2 projects:

  1. PortalExtension View Project: This is where your development work will occur
  2. PortalSharedLibrary Application Project: This is where the SharedLibrary content is packaged
Project Browser

 As illustrated in the project browser picture, a model project can be added as a dependency to the PortalExtension project. In other words, your Portal Extension conforms to ADF Development best practices.  When you build and deploy the Portal Shared Library,  you MUST increment the implementation version number located in the MANIFEST.MF file.

Implementing the functionality in PortalExtension project

Note: Your application source will be developed in the PortalExtension project; no source goes in the PortalSharedLibrary project. 

It's important to note that the PortalExtension project follows the same rules as any other ADF View project. There are no constraints therefore you can reference a model project and follow ADF Development best practices.

In the event that you wish to override items in the Portal Application deployment descriptors, you can add the entries to the PortalSharedLibrary project. For example, We added a web.xml file to the PortalSharedLibrary project where we disabled JS content compression to facilitate debugging by adding the org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION property.

Note: You must delete the public_html folder in the PortalSharedLibrary project to successfully deploy and test the PortalExtension project in the WebLogic Server embedded in JDeveloper. This folder will be present if you added a web.xml to override various properties in the webcenter application deployment descriptor.

Testing your Portal Extension

During development, you will frequently unit test your Portal Extension. This is achieved by running the project on the WebLogic Server integrated with JDeveloper. Again, you must delete the public_html folder in the Portal Shared Library Project if you added web.xml deployment descriptor. Failure to do so will result in the following error:

<May 20, 2014 7:39:25 AM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004

weblogic.application.ModuleException: Failed to load webapp: 'RedstackPortalExtension-PortalSharedLibrary-context-root'

at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)


Caused By: java.lang.ClassNotFoundException: javax.faces.webapp.ConverterELTag

at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)

Deploying the Portal Shared Library 

The WebCenter Portal installation ships with an empty shared library called extend.spaces.webapp. The webcenter application has a library reference to extend.spaces.webapp defined in it's weblogic.xml. This library reference is the mechanism by which the shared library is merged with the webcenter application during deployment.

If you're organization is composed of multiple development teams, it's likely that each team will be working on different functionality. This functionality can be packaged as a conforming webapp shared library which must be referenced by the weblogic.xml deployment descriptor in the your custom PortalExtension project. In other words, develop your taskflows in standard ADF Web projects then package them as shared libraries. Create a single Portal Extension Workspace where you will reference the custom shared libraries you developed in the PortalExtension project weblogic.xml.

By default, the weblogic.xml is not added to the PortalExtension project therefore you must add it using the JDeveloper New File Wizard.  

Note: The most important task to remember is to increment the implementation version in the Shared Library project MANIFEST.MF file. Failure to do so will prevent the WebCenter Application from deploying because of application assembly errors.

The steps for deploying a shared library to WebCenter Portal Domain are discussed here


Extending WebCenter Portal .8 functionality is well documented and straight forward. The key things to keep in mind are:

  1. Your source is developed in the PortalExtension project
  2. You can deploy additional shared libraries by referencing them in the PortalExtension project weblogic.xml deployment descriptor
  3. The Portal Extension Workspace is similar to other ADF Web Projects in that you can add a model project and follow common ADF Development best practices (no special requirements)


Adding my personal experience on it.

Personally I do not like to add Task Flows or related code to them into the Portal Extension project. It can be something problematic and unmaintainable for large projects.

My personal recommendation it is only to maintain Servlets, Filters, Listener and Managed Beans in PortalExtension Project and separate always the Task Flows and Integration Projects in separated.

Thanks for sharing knowledge :).


Posted by Daniel Merchan Garcia on June 03, 2015 at 01:12 AM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Welcome to my blog. I use this site to share my experience as well as tips and tricks on Oracle Fusion Middleware products.



« June 2016