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: ADFJSFPortletBridgeApp.zip.
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.

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge1

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

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge2

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

http://localhost:7101/ReusableTaskFlowApp-ViewController-context-root/info

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge3

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.

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge4

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.

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge5

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

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge6

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge7

This is the result!

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge8

expose-adf-task-flow-as-portlet-using-jsf-portlet-bridge9

Waslley Souza

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

Leave a Reply

Your email address will not be published. Required fields are marked *