Tuesday, February 3, 2015

Integrate ADF Taskflows with Oracle Webcenter Portal:Spaces(Builder)

One of the most important features of Oracle Webcenter Portal:Spaces is the integration with ADF Taskflows, in this post I'll explain how to achieve that step by step.

1. We need to deploy our ADF application which contain all the taskflows as an ADF Shared Library




1.1 Go to Project Properties > Deployment


1.2 Press the new button and choose "ADF Library JAR File" as Archive Type and confirm.


1.3 Now Right Click your view controller and go to Deploy > (Your Deployment profile name)



1.4 Press Next > Finnish



1.5 After Successful deployment of the JAR file, get it from your view controller Deploy Folder.

2. Now we need to create a Wrapper web application to contain the ADF Shared library in order to deploy it in weblogic as a Shared Library.



2.1 Type your shared library name, this name with be used from Webcenter portal for reference.



2.2 Continue with creation wizard as we don't need any thing from this web application except containing our ADF Shared JAR.

2.3 Deploy your project to WAR and get the WAR from your deploy folder.



2.4 Delete any entries in web.xml and weblogic.xml

2.5 create a lib folder inside WAR > WEB-INF and add the ADF shared library in it.

2.6 Open Weblogic Administration Console



2.7 Go to Deployments > Install > Upload your file and choose your WAR (Shared Library)



2.8 Make sure that you choose "Install this deployment as a library"



2.9 Make sure that the Shared Library targets WC_Spaces and Finnish





Now we have a shared library deployed on our application server, but we still need to use the task flows inside this shared library.

To achieve this we need to refer to this shared library from portal by using the extend.spaces.webapp web application.

3. Go back to JDeveloper and create a new Webcenter Portal Server Extension

Note: you need to install the Webcenter extensions to your JDeveloper by going to 
Help > Check for updates  and search for portal extensions and download it.



3.1 Continue your creation wizard normally.



3.2 You will find two projects in the created application: PortalExtention and PortalSharedLibrary

3.3 Right click on PortalSharedLibrary > New > "Search for weblogic in all applications" > Choose Weblogic Deployment Descriptor > weblogic.xml > Finnish

3.4 Edit weblogic.xml and add your Shared Library reference (Your WAR Name)



 3.5 Go to your PortalSharedLibrary project and edit MANIFEST.MF and increase the "Implementation-Version" number.



3.6 Deploy PortalSharedLibrary



3.7 Choose your domain connection and check the  "Deploy to selected instances in the domain" and choose WC_SPACES AND also check the "Deploy as a shared Library" and Finnish




After successful deployment, now Oracle Webcenter Portal:Spaces can use the shared task flows from your ADF application.

4 Add the shared taskflows to your Portal.

4.1 Go to http://<host>:<port>/webcenter/portal/builder URL in your portal and login.

4.2 Go to Shared Assets(1.8) or Resources(in earlier versions) tab.

4.3 Select Resource Catalogs and create a new one.



4.4 Check the Available check box in order to use this resource catalog in your portal pages.



     In earlier versions :

4.5 Edit the created resource catalog and press Add from Library



4.6 Now search for your taskflow name and add it.

That's it :) now you can use any of the registered taskflows in you Portal Pages.

5 comments: