You are here

Reusing taskflows from an ADF application into WebCenter Spaces

When you are building a portal with WebCenter Spaces, you often want to extend WebCenter Spaces with your own functionality. This can be done by deploying portlets or by adding taskflows to WebCenter Spaces. There are distinct differences on when to go for portlets and when to go for taskflows. In short, when scalability is important you should go for portlets. When personalization is very important you also should go for portlets. If design is very important or integration with the security context then taskflows should be used. For more information on the differences I can point you to another blog post that discusses this topic in more dept.

This post will focus on how to add your own custom taskflows to WebCenter Spaces. Oracle has provided some documentation that explains how to do this. When I was following this documentation I faced some issues that weren't addressed so I will try to explain them here.

I will not explain all the steps into details because they are explained in the documentation. I will focus only on the things I do differently.

In my case I had an existing Fusion Web Application that uses ADF. That application contains several taskflows that I now want to expose in WebCenter Spaces. When you create taskflows from scratch that are designed for spaces, the steps in the documentation are sufficient. When you, like me, want to add existing taskflows from a different application, the steps provided in the documentation are not sufficient.

First of all we need to add the project (or projects) to the DesignWebCenterSpaces application. This can be done by selecting File, Open from the menu and navigate to your project. Select the jpr project file and press open.

if you are also using business components, you also will need to add the model project as well.
Also notice that when you are using ADF BC, you always should use a JDBC data source configured in the WebLogic server and not use a local database connection as this will not work with the DesignWebcenterSpaces application.
This is the result:

The Model and ViewController project are the projects from my ADF Application.

The next thing to do is to add a taskflow-registry.xml to the META-INF folder under the application source of the ViewController project:

This file contains all the taskflows that you want to expose to Spaces. Here is an example that only exposes a single taskflow:

  1. <?xml version = '1.0' encoding = 'UTF-8'?>
  2. <task-flow-registry xmlns="">
  3.    <task-flow-descriptor path="WEB-INF/yourTickets.xml"
  4.       id="yourTickets" type="task-flow-definition"
  5.       uses-page-fragments="true" library-internal="false"
  6.       train="false"/>
  7. </task-flow-registry>

The task-flow-descriptor contains information about your taskflow such as the path to the taskflow definition, a unique ID, a parameter that tells if your taskflow is using fragments or not and if it is a train or not.

The deployment process is the same as described in the documentation. Deploy the ViewController as an ADF library Jar and add this jar to the libraries of the WebCenterSpacesExtensionLibrary:

Also make sure that the library is added to the deployment profile. This can be done by selecting the Deployment section in the Project Properties and edit the default profile:

Make sure you select the checkbox so the library will be added to the EAR file:

Run the clean-stage ant target and then the deploy-shared-lib.

Once the deployment is finished you should be able to add the taskflow to a resource catalog. By default the taskflow will not be available in any RC. Your custom taskflows will be available in the taskflow library.

WebCenter Tags: 


A Great post, but the file should be named task-flow-registry.xml not taskflow-registry.xml

You're sure? I have tested it with taskflow-registry.xml and it works...

Yes, I'm sure it worked with you, because as soon as you put your projects in the WebCenterDesign Application, the task-flow-registry gets created for you, so it shouldn't be a problem, I've checked it on my log!

Notice also the starting tag of the XML file starts with task-flow-registry.

Another example if you followed the developer's guide, and downloaded SampleWebCenterSpacesExtensions in the project "SampleTaskFlows" you will find the name is "task-flow-registry" as well.

Hi Yannick,

I followed all the steps you have written above. I got the message as Redeployment Successful but i am not able to see the task flow in the library as you had said. Could you please suggest some solution?

In the documentation it says that you need to download SampleWebCenterSpacesExtensions and modify it. I have not followed that step could that be the reason?

I have created a taskflow and wish to add it in Webcenter spaces. Do i need SampleWebCenterSpacesExtensions? In What all cases do i require SampleWebCenterSpacesExtensions?

Can you please elaborate on how to add JDBC data source. From your statements ("Also notice that when you are using ADF BC, you always should use a JDBC data source configured in the WebLogic server and not use a local database connection as this will not work with the DesignWebcenterSpaces application.")
How do we add this in the extended task flows?

I'm having an exception when running the task flow in WebCenter Spaces. See below for the logs.

Caused By: oracle.jbo.ConfigException: JBO-33003: Connection name HrDS is not defined.
at oracle.jbo.client.Configuration.initializeFromConnectionName(
at oracle.jbo.client.Configuration.getConfiguration(
at oracle.jbo.common.ampool.PoolMgr.loadConfiguration(
at oracle.jbo.common.ampool.PoolMgr.findPool(
at oracle.adf.model.bc4j.DCJboDataControl.findApplicationPool(
at oracle.adf.model.bc4j.DCJboDataControl.initializeSessionCookie(
at oracle.adf.model.bc4j.DCJboDataControl.initializeJboSession(
at oracle.adf.model.bc4j.DataControlFactoryImpl.createSessionInternal(
at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(
at oracle.adf.model.binding.DCDataControlReference.getDataControl(
at oracle.adf.model.BindingContext.instantiateDataControl(
at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(
at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(
at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(
at oracle.adf.model.BindingContext.internalFindDataControl(
at oracle.adf.model.BindingContext.get(
at javax.el.MapELResolver.getValue(
at com.sun.faces.el.DemuxCompositeELResolver._getValue(
at com.sun.faces.el.DemuxCompositeELResolver.getValue(
at com.sun.el.parser.AstValue.getValue(Unknown Source)
at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
at util.JSFUtils.resolveExpression(
at util.ADFUtils.getApplicationModuleForDataControl(
at business.SOPDAO.findAll(

This is the documentation on how to create a connection in WebLogic:
Once you have created it, right click on your application module in JDeveloper and select Configurations.
Select Edit from the popup.
Select JDBC DataSource from the connection type and copy/paste the name you gave your data source in webLogic to there.
After you have deployed your taskflow again, it will use a JNDI lookup to get the datasource information from WebLogic.

Hello Yannick,

Thanks for your reply. It now works.

Hi Yannick,

Have you tried deploying a Taskflow that uses WSDL data control and deployed it into the Webcenter Spaces Application?

When the taskflow uses ADFBC, I see no errors.

The steps was not detailed on this and I am encountering error such as this

Caused by: java.lang.NullPointerException
at oracle.adfinternal.model.adapter.webservice.WSModel.getServices(
at oracle.adfinternal.model.adapter.webservice.WSModel.getServiceOperations(

Webcenter 11G PS3

Thanks for the post. I need some information on WebCenter Spaces.

By default there are couple of parameters such as Space name, description, tag, url, status (Public, Private) etc. is required to create the Space with the Out-of-the-box screen in Spaces. But we have a requirement to create Group Space with some additional parameters too.

I am finding a solution for that. Can we build a task flow with all the parameters that we need to create the Spaces ? If that is possible, can we use Spaces API to create the space and then deploy that task flow in Spaces ?

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer