Expose ADF Task Flow as Portlet using JSF Portlet Bridge

If you need to execute a Task Flow in an application that is deployed in another server, and don’t want to distribute it as ADF Library, you can expose this Task Flow as a Portlet using Oracle JSF Portlet Bridge. The Oracle JSF Portlet Bridge enables application developers to expose their existing Oracle ADF applications and Task Flows as JSR 286 Portlets. This way, your web application and Portlet Producer application are the same, because the Portlet Producer application is your existing web application with additional Portlet artifacts.

Download the sample application:
If you want to create the application from scratch, you can use this post: Reusable Task Flows.

You have two options to create the Portlet from a Task Flow: Create Portlet Entry and Run as a Portlet.

Create Portlet Entry

Right-click on EditEmployeesTaskFlow.xml and choose Create Portlet Entry.
In the Create Portlet Entry dialog, click on OK.


The portlet.xml file has been created. It contains the configurations of Portlet.


Save everything and execute the ViewEmployeesTaskFlow.
Go to WSRP Producer Test Page to view the informations of Portlets.



Run as a Portlet

Right-click on EditEmployeesTaskFlow.xml and choose Run as a Portlet. This option automatically create the portlet.xml file, and the application is deployed to the IntegratedWebLogicServer, using the context root portletBridgeTester-Portlets-context-root.


Consuming the Portlet

Use the WebCenter Portal application (aka WebCenter Spaces) to consume the portletized task flow. Because the Oracle JSF Portlet Bridge uses WSRP 2.0 features, you should register the producer using the WSRP v2 WSDL URL listed in the WSRP Producer Test Page.


Create a page and add the portletized task flow to it.



This is the result!