Lyudmil Pelov, A-Team, Oracle December Development Lifecycle for Task Flows in Oracle WebCenter Portal 11gR1 version

Similar documents
WebCenter Portal Task Flow Customization in 12c O R A C L E W H I T E P A P E R J U N E

ORACLEAS PORTAL 10g (10.1.4) INTEGRATE YOUR ENTERPRISE CONTENT MANAGEMENT SYSTEMS INTO ORACLE PORTAL

Oracle Web Service Manager 11g Component Level Role Authorization (in SOA Suite) March, 2012

Oracle WebCenter Portal 11g Developer Workshop

Oracle WebCenter Portal 11g Developer Workshop

Oracle WebCenter Portal 11g Developer Workshop

An Oracle White Paper October The New Oracle Enterprise Manager Database Control 11g Release 2 Now Managing Oracle Clusterware

Maximum Availability Architecture

Oracle WebCenter Suite Integrating Secure Enterprise Search

Receiving PeopleSoft Message (PeopleTools 8.17) through the Oracle AS PeopleSoft Adapter. An Oracle White Paper September 2008

Oracle WebCenter Portal 11g Developer Workshop

Oracle WebCenter Portal 11g Developer Workshop

Installation Instructions: Oracle XML DB XFILES Demonstration. An Oracle White Paper: November 2011

Oracle Fusion Middleware 11g Oracle Access Manager Frequently Asked Questions June 2009

An Oracle White Paper November Primavera Unifier Integration Overview: A Web Services Integration Approach

Creating Custom Project Administrator Role to Review Project Performance and Analyze KPI Categories

An Oracle White Paper July Oracle WebCenter Portal: Copying a Runtime-Created Skin to a Portlet Producer

JDeveloper Downloading a Workspace for WebCenter Spaces Development

Tutorial on How to Publish an OCI Image Listing

Oracle Application Development Framework Overview

Oracle WebCenter Portal 11g Developer Workshop

Oracle Utilities Customer Self Service Release Whitepaper: Consuming OUCSS Taskflows in Custom Portals E October 2011

Loading User Update Requests Using HCM Data Loader

An Oracle White Paper February Combining Siebel IP 2016 and native OPA 12.x Interviews

Improve Data Integration with Changed Data Capture. An Oracle Data Integrator Technical Brief Updated December 2006

SonicMQ - Oracle Enterprise Gateway Integration Guide

Oracle Service Registry - Oracle Enterprise Gateway Integration Guide

Generate Invoice and Revenue for Labor Transactions Based on Rates Defined for Project and Task

Oracle Enterprise Performance Management Cloud

Data Capture Recommended Operating Environments

Oracle Best Practices for Managing Fusion Application: Discovery of Fusion Instance in Enterprise Manager Cloud Control 12c

Veritas NetBackup and Oracle Cloud Infrastructure Object Storage ORACLE HOW TO GUIDE FEBRUARY 2018

Question No: 1 In which file should customization classes be specified in the cust-config section (under mds-config)?

Maximum Availability Architecture

Oracle Virtual Directory 11g Oracle Enterprise Gateway Integration Guide

Configuring Oracle Business Intelligence Enterprise Edition to Support Teradata Database Query Banding

Frequently Asked Questions Oracle Content Management Integration. An Oracle White Paper June 2007

Oracle Fusion Middleware

April Understanding Federated Single Sign-On (SSO) Process

Oracle Financial Services Regulatory Reporting for US Federal Reserve Lombard Risk Integration Pack

1Z0-430

Creating Your First WebCenter Application with Java Content Repository

An Oracle White Paper May Example Web Listener Deployment for Oracle Application Express

Oracle FLEXCUBE Direct Banking Release Dashboard Widgets Transfer Payments User Manual. Part No. E

Next-Generation SOA Infrastructure. An Oracle White Paper May 2007

Correction Documents for Poland

Oracle Cloud Applications. Oracle Transactional Business Intelligence BI Catalog Folder Management. Release 11+

Achieving High Availability with Oracle Cloud Infrastructure Ravello Service O R A C L E W H I T E P A P E R J U N E

An Oracle White Paper October Release Notes - V Oracle Utilities Application Framework

Oracle WebLogic Server 11g: Administration Essentials

Oracle Fusion General Ledger Hierarchies: Recommendations and Best Practices. An Oracle White Paper April, 2012

Contract Information Management System (CIMS) Technical System Architecture

Establishing secure connections between Oracle Ravello and Oracle Database Cloud O R A C L E W H I T E P A P E R N O V E M E B E R

Oracle Fusion Configurator

FCUBS Process Flow Deployment Oracle FLEXCUBE Universal Banking Release [December] [2017]

Oracle FLEXCUBE Direct Banking Release Dashboard Widgets Customer Services User Manual. Part No. E

An Oracle White Paper December, 3 rd Oracle Metadata Management v New Features Overview

Oracle FLEXCUBE Direct Banking Release Corporate Cash Management User Manual. Part No. E

An Oracle Technical White Paper September Oracle VM Templates for PeopleSoft

Oracle Forms Services Oracle Traffic Director Configuration

Automatic Receipts Reversal Processing

SETTING UP ORACLE ULTRA SEARCH FOR ORACLE PORTAL 10G (10.1.4)

Oracle Fusion Middleware

Siebel CRM Applications on Oracle Ravello Cloud Service ORACLE WHITE PAPER AUGUST 2017

SOA Cloud Service Automatic Service Migration

Oracle Fusion Middleware

Oracle CIoud Infrastructure Load Balancing Connectivity with Ravello O R A C L E W H I T E P A P E R M A R C H

Oracle WebLogic Portal O R A C L E S T A T EM EN T O F D I R E C T IO N F E B R U A R Y 2016

Establishing secure connectivity between Oracle Ravello and Oracle Cloud Infrastructure Database Cloud ORACLE WHITE PAPER DECEMBER 2017

Migration Best Practices for Oracle Access Manager 10gR3 deployments O R A C L E W H I T E P A P E R M A R C H 2015

Oracle Enterprise Data Quality New Features Overview

An Oracle White Paper March Introduction to Groovy Support in JDeveloper and Oracle ADF 11g

Technical Upgrade Guidance SEA->SIA migration

An Oracle White Paper September Security and the Oracle Database Cloud Service

An Oracle Technical White Paper May Deploying Oracle Beehive with BlackBerry Enterprise Server for MDS Applications

Using the Oracle Business Intelligence Publisher Memory Guard Features. August 2013

Oracle WebCenter Content

Highly Available Forms and Reports Applications with Oracle Fail Safe 3.0

Migrating VMs from VMware vsphere to Oracle Private Cloud Appliance O R A C L E W H I T E P A P E R O C T O B E R

Oracle Database 10g Release 2 Database Vault - Restricting the DBA From Accessing Business Data

Profitability Application Pack Installation Guide Release

Create Individual Membership. This step-by-step guide takes you through the process to create an Individual Membership.

Oracle DIVArchive Storage Plan Manager

An Oracle White Paper April Oracle Application Express 5.0 Overview

How to Monitor Oracle Private Cloud Appliance with Oracle Enterprise Manager 13c O R A C L E W H I T E P A P E R J U L Y

Oracle Data Provider for.net Microsoft.NET Core and Entity Framework Core O R A C L E S T A T E M E N T O F D I R E C T I O N F E B R U A R Y

Deploying Custom Operating System Images on Oracle Cloud Infrastructure O R A C L E W H I T E P A P E R M A Y

Data Capture Recommended Operating Environments

Product Release Notes

Case Study: Redeveloping an Oracle Forms application using Oracle JDeveloper and Oracle ADF

RAC Database on Oracle Ravello Cloud Service O R A C L E W H I T E P A P E R A U G U S T 2017

Oracle Fusion Middleware. 1 Oracle Team Productivity Center Server System Requirements. 2 Installing the Oracle Team Productivity Center Server

Pricing Cloud: Upgrading to R13 - Manual Price Adjustments from the R11/R12 Price Override Solution O R A C L E W H I T E P A P E R A P R I L

Deploying the Zero Data Loss Recovery Appliance in a Data Guard Configuration ORACLE WHITE PAPER MARCH 2018

Spring Soup with OC4J and MBeans

OES Permission Checks in ADF Task Flows

Oracle Access Manager Oracle FLEXCUBE Universal Banking Release [May] [2017]

ORACLE WEBLOGIC SERVER 10g R3 ENTERPRISE EDITION

Working with Time Zones in Oracle Business Intelligence Publisher ORACLE WHITE PAPER JULY 2014

Oracle Access Manager 10g - Oracle Enterprise Gateway Integration Guide

Transcription:

Lyudmil Pelov, A-Team, Oracle December 2013 Development Lifecycle for Task Flows in Oracle WebCenter Portal 11gR1 version 11.1.1.8.0

Table of Contents Introduction...3 About the Examples Used in This Paper...3 Step 1: Create a Fusion Web Application (GenericServiceConsumer)...6 Step 2: Start the Generic Web Service... 11 Step 3: Create a Web Service Proxy... 16 Step 3a: Create a Web Service Proxy Facade... 23 Step 3b: Create a Data Control from the Proxy Facade (GenericServiceConsumer)... 29 Step 4: Create a Bounded Task Flow... 31 Step 5: Consume the Data Control in the Task Flow... 35 Step 6: Create a Test Page to Test the Sample Task Flow... 39 Step 7: Deploy the Sample Task Flow to an ADF Library JAR File... 44 Step 8: Create the Deployer Project... 50 Step 9: Deploy the Deployer Project with the Sample Task Flow (WAR file) to WebCenter Portal... 62 Step 10: Register the Sample Task Flow with WebCenter Portal... 66 Step 11: Deploy PotalSharedLibrary to WebCenter Portal... 75 Step 12: Register the Web Service Connection with WebCenter Portal... 79 Step 13: Add the Sample Task Flow to a WebCenter Portal Resource Catalog... 83 Step 14: Change the Sample Task Flow and Redeploy... 88 Troubleshooting... 95 2

Introduction This paper steps you through the development lifecycle of a sample task flow in WebCenter Portal 11.1.1.8.0. The example shows you how to develop and test a task flow in JDeveloper, then describes how to deploy, redeploy, and use the task flow in WebCenter Portal. This paper supplements the information found in Planning a Portal with WebCenter Portal, available at: http://docs.oracle.com/cd/e29542_01/webportal.htm About the Examples Used in This Paper This paper ships with the following sample JDeveloper applications: GenericWebService Includes a web service that returns a simple user collection with information. This sample web service is consumed by the sample task flow. To follow along with this paper, you must first import the GenericWebService project into JDeveloper and deploy the web service to a managed server accessible from WebCenter Portal. GenericServiceConsumer Includes a sample task flow and a test page that enables you to test the task flow independently from WebCenter Portal. Deployer Part of the GenericServiceConsumer application. Used to deploy the sample task flow (as an ADF shared library WAR file) to the WebCenter Portal managed server. The above examples should be used with JDeveloper 11.1.1.7 and the latest WebCenter Portal extension version 11.1.1.8. The high-level steps involved, as well as the individual actions comprising each step, are depicted here: 3

Develop and test the sample task flow 1. Create a Fusion Web application (GenericServiceConsumer) 2. Deploy and start up the web service (GenericWebService) 3. Create a web service proxy (GenericServiceConsumer) 4. Create a bounded task flow (generic-service-taskflow) 5. Consume the proxy (data control) in the task flow 6. Create a test page to test the sample task flow Deploy the sample task flow 7. Deploy the sample task flow to an ADF library JAR file 8. Create the Deployer project and import the JAR file 9. Deploy the Deployer Project (ADF Shared WAR) to WebCenter Portal Register the sample task flow with WebCenter Portal 10. Register the sample task flow (ADF Shared WAR) with WebCenter Portal (extend.spaces.webapp.war) 11. Deploy PortalSharedLibrary (extend.spaces.webapp.war) to WebCenter Portal 12. Register the web service connection with WebCenter Portal 4

Use the sample task flow in WebCenter Portal 13. Add the sample task flow to a resource catalog and drop on pages Redeploy updates to the sample task flow 14. Change the sample task flow and redeploy The overall flow is illustrated in this diagram: The remainder of this paper describes each step of the process in detail. 5

Step 1: Create a Fusion Web Application (GenericServiceConsumer) The Fusion Web application serves as a host in which task flows are created and tested. To create the application: 1. In JDeveloper, select File> New 6

2. In the New Gallery window, select General->Applications, and then click Fusion Web Application (ADF). 7

3. In the Application Name field, enter GenericServiceConsumer (or any name you choose) as well as package prefix and click Next. 8

4. Keep the default settings and click Finish. 9

5. An application named GenericServiceConsumer displays with an ADF project, as shown here: 10

Step 2: Start the Generic Web Service NOTE: Any public web service can be used to complete this guide! 1. To test the web service, open the sample GenericWebService application provided with this paper, right-click the UserService.java class, and select Test Web Service, as shown below: This step deploys the web service to the integrated WebLogic Server, then starts and prepares it for testing, as shown below: 11

Select an operation from the Operations drop-down to test a specific web service method. For example you can test the getuser() method by using following names as argument: Fill, Peter, Rick. If you want to approach new web service test with the HTTP Analyzer, click the Target URL link in the integrated WebLogic Server Log (highlighted in red, as shown on the screenshot above). This will open the HTTP Analyzer again and allow you to test new web service function. The HTTP Analyzer window can be closed after you finish testing. 12

The GenericWebService Application includes following two classes: package com.oracle; public class User { private int id; private String name; private int age; public User() { super(); } public User(int id, String name, int age) { this.id = id; this.name = name; this.age = age; } public void setname(string name) { this.name = name; } public String getname() { return name; } public void setage(int age) { this.age = age; } public int getage() { return age; } public void setid(int id) { this.id = id; } public int getid() { return id; } 13

} package com.oracle; import java.util.arraylist; import java.util.collection; import java.util.list; import javax.jws.webservice; @WebService(serviceName = "UserServiceWS") public class UserService { private List<User> users = new ArrayList<User>(); public UserService() { users.add(new User(1, "Fill", 42)); users.add(new User(2, "Peter", 32)); users.add(new User(3, "Rick", 41)); } public String getmessage(string s) { if (s == null s.equalsignorecase("")) return "Hello nobody!"; } return "Hello: " + s; public void adduser(string name, int age) { users.add(new User(users.size() + 1, name, age)); } public User getuser(string name) { for (User user : this.users) { if (user.getname().equals(name)) { return user; } } } return null; public List<User> getusers() { 14

} } return users; 2. Copy the WSDL URL, which you will need later when you create the java proxy. Rightclick the link and select Copy. 15

Step 3: Create a Web Service Proxy In this step, you ll create a web proxy to consume the generic web service. 1. In JDeveloper, open the GenericServiceConsumer application you created in step 1. Highlight ViewController, right-click, and select New 16

2. From the New Gallery, All Technologies tab, under the Business Tier from the left side navigation select Web Services, then select Web Service Proxy from the right side and click OK. 17

3. On the Create Web Service Proxy welcome screen, click Next. 4. Paste the WSDL URL from your web service, leave the rest of defaults, then click Next. 18

5. Specify the namespaces for the packages, which will be created after the import, then click Next. Package Name: com.oracle.proxy.service Root Package for Generated Types: com.oracle.proxy.types 19

6. Confirm the end point configuration and click Next. 7. Keep the default option on Asynchronous Methods and click Next. 20

8. Keep the defaults and click Next. 9. Keep the defaults and click Next. 21

10. Confirm the methods delivered from the web services and click Finish to create the proxy. If the proxy was configured properly, you should see following screen: 22

Step 3a: Create a Web Service Proxy Facade To use the web service proxy in data controls, you must create a proxy facade to abstract the logic from the web service proxy. To do this: 1. In JDeveloper, open the GenericServiceConsumer application. 2. Highlight ViewController, right-click, and select New 23

3. From the New Gallery, select Java Class. 24

4. Enter a name for the Java class and click OK. 25

5. Change ProxyFacade to reference the Web Service Connection from the ADF Connections configuration, which can be specified later. Notice that the name used for the lookup search should be the same as the connection name: The source code from the ProxyFacade class: package com.oracle.view; import com.oracle.proxy.service.userservice; import com.oracle.proxy.service.userservicews; import com.oracle.proxy.types.user; import java.util.list; import javax.xml.ws.webserviceref; import oracle.adf.model.connection.webservice.api.webserviceconnection; import oracle.adf.share.adfcontext; public class ProxyFacade { @WebServiceRef private UserServiceWS userservicews; private UserService userservice; 26

public ProxyFacade() { try { WebServiceConnection connection = (WebServiceConnection)ADFContext.getCurrent().getConnectionsContext().look up("genericuserwebserviceconnection"); userservice = connection.getjaxwsport(userservice.class); this.userservice = this.userservicews.getuserserviceport(); } catch (Exception e) { e.printstacktrace(); } } public List<User> getusers() { return this.userservice.getusers(); } } public User getuser(string username) { return this.userservice.getuser(username); } Within the constructor, the current context looks for the web service configuration within the connection.xml file. The connection should be specified within the local JDeveloper project connection.xml file by using following XML syntax: <?xml version = '1.0' encoding = 'UTF-8'?> <References xmlns="http://xmlns.oracle.com/adf/jndi"> <Reference name="genericuserwebserviceconnection" classname="oracle.adf.model.connection.webservice.impl.webserviceconnectio nimpl" manageinoracleenterprisemanager="true" deployable="true" xmlns=""> <Factory classname="oracle.adf.model.connection.webservice.api.webserviceconnection Factory"/> <RefAddresses> <XmlRefAddr addrtype="webserviceconnection"> <Contents> <wsconnection description="http://localhost:8888/genericwebservice- UserWebService-context-root/UserServiceSoap12HttpPort?WSDL" service="{http://oracle.com/}userserviceport"/> </Contents> 27

</XmlRefAddr> </RefAddresses> </Reference> </References> Please note that this excerpt shows the Web Service connection used by WebCenter Portal. Even if this connection appears in the local JDeveloper Project connection.xml file, the connection will not appear within the Connections section as shown on the screen shot below until you add it manually: In order to add the connection open the Consumer application. Under Application Resources- >Descriptions>ADF META-INF open the connections.xml file and add the XML Reference snipped already provided, as shown on the screenshot above. NOTE: It is very important to add this connection configuration to be able to test the application locally at your development machine! 28

Step 3b: Create a Data Control from the Proxy Facade (GenericServiceConsumer) In this step you ll create a data control, using the proxy facade you created in step 4. 1. In JDeveloper, go to the GenericServiceConsumer project, right-click on the ProxyFacade class, and select Create Data Control. 29

2. Wait for JDeveloper to prepare the configurations. After a few seconds, the data controller should be created. The new data control can be now used within ADF pages or task flows. 30

Step 4: Create a Bounded Task Flow In this step, you ll create a bounded ADF task flow. Later on, you will deploy this task flow to the portal server and use it in WebCenter Portal. Note: It is important that you work within the ViewController project. In a later step, you will export content from the ViewController project to an ADF JAR library ready for deployment to a portal server. (Alternatively, you can create the business logic in a separate project and then import it to the ViewController project.) 1. Select the ViewController project, then click the New icon. 31

2. From the New Gallery, select ADF Task Flow (JSF) and click OK. 3. Enter a file name in the File Name field. 4. On enter the File Name the Task Flow ID will be automatically changed. IMPORTANT: Choose the name carefully. The Task Flow ID(generic-service-task-flow) we specify here is what should be used to identify the task flow in WebCenter Portal s resource catalog later. 32

5. From the palette on the right, select View and drag and drop it on to the task flow definition surface. Enter userservice for the view name. 33

6. Double-click the view to create a new fragment. In the File Name field, enter userservice.jsff. 7. Select Blank Page as the page template and click OK. 8. Save all your changes. 34

Step 5: Consume the Data Control in the Task Flow In this step, you ll consume the data control you created earlier within the task flow. 1. Open the userservice.jsff page fragment. 2. Expand the Data Controls tab, then go to ProxyFacade->getUser(String). Note: As a test, we will first create a simple example based only on the getuser service call. We will use the rest of the service later. 35

3. Drag and drop getuser from the Data Controls navigator to the task flow page fragment, then select ADF Parameter Form from the drop-down list. The ADF Parameter Form option creates a form that allows the return of user information based on user name. 36

4. From the function getuser, drag and drop age (under Return parameter) to the page. The age parameter displays the age of the user in the information returned. 5. From the drop-down menu, select the output option you prefer. 37

The page should look now like this: 38

Step 6: Create a Test Page to Test the Sample Task Flow To test the task flow, create a page and drag and drop the task flow as a binding on the page. 1. In the JDeveloper GenericServiceConsumer application, click the New icon, then select JSF Page to create a new page. 2. Enter a name for the new page, for example userservicetester.jspax and select a template your choice. The page could have blank template, as it will be used only to test 39

the task flow. After the page has been created, your project should look like this: 40

3. Drag and drop the task flow to the page, as shown below. Be sure to select Region from the drop-down menu. 41

4. Run the page to test the task flow. The page should start without any error messages and display in your default browser, as shown here: 42

5. When you type a user name in the Username field, the age of the user should display. The default web service has the following user names: Fill: Age 42, Peter: Age 32, Rick: Age 41. Test all three users to make sure that the web service and task flow work properly. 43

Step 7: Deploy the Sample Task Flow to an ADF Library JAR File In this step, you ll deploy the sample task flow that contains the web service proxy and the data control to an ADF library (JAR file) that you can use in WebCenter Portal. Note: There are two stages in task flow deployment: Deploy the task flow project to an ADF library JAR file. Create another deployment profile to deploy the ADF library JAR file to your target server. This step describes the first stage (deployment to JAR file). To deploy the GenericServiceConsumer task flow project to a JAR file: 1. To export the ViewController project as an ADF library JAR file, you must create a new deployment profile. Right-click the ViewController project and select Project Properties. 44

2. In the new window, select Deployment. 3. Select New in the panel on the right to create a new WAR profile. 45

4. Under Archive Type, select ADF Library JAR File, and enter a name for the file (for example, adflibgenericserviceconsumer1). Click OK. 46

5. Keep the default settings on the following screen, and click OK to save the new deployment profile. You will use this profile in the next step. 6. Create the ADF Library JAR file by deploying the profile. Right-click the ViewController project, then select Deployment-><Deployment Profile Name>. 47

This creates the JAR file within the local JDeveloper project. 7. On the Deployment Action screen, select Deploy to ADF Library JAR file and click Next. 48

8. Validate the summary information, and then click Finish to create the JAR file. The folder containing the ADF library JAR file displays within the log if the deployment profile executed successfully. In the next step, you will deploy the newly created ADF library JAR file containing your task flow to WebCenter Portal s managed server using the Deployer project. 49

Step 8: Create the Deployer Project In this step, you ll create a generic project that can deploy one or more task flow projects. This project is only used to deploy ADF libraries (JAR files) to a WebCenter Portal managed server. 1. To create the Deployer project within the GenericServiceConsumer application, click New, then select New Project. 50

2. On the next screen, select Generic Project, and then click OK. 3. In the Project Name field, type Deployer, then click Finish. 51

The Deployer project displays in the navigator, as shown here: 4. Next we need to include the ADF library JAR you created from the ViewController deployment profile in the new Deployer project. To do this: 52

a) Right-click the Deployer project and select Project Properties. From the new screen, select Libraries and Classpath. 53

b) Click Add JAR/Directory. From the next screen, select the ADF library JAR file (as shown below). Click Select, then OK to confirm. 54

This action changes the Generic Project into a project with ADF Dependencies, as shown below: IMPORTANT: Double check the WEB.XML file that there are no entries within the file. You should do this every time you include any library into the Deployer project. Entries in WEB.XML file will cause exception on deployment. For more information see the troubleshooting section on the end of this document. WEB.XML file should look like the screenshot below: 55

c) Save your changes. In the next step you will create a manifest file that allows you to deploy several versions of the same project to the WebCenter Portal managed server. You cannot deploy multiple ADF shared libraries with the same version, but you can use the manifest file to increment deployment versions. 5. Before you can add a manifest file to the Deployer project, you must create a new deployment profile. To create a deployment profile, click the Deployer project and select Project Properties. 56

6. On the Project Properties screen, select Deployment, then click New 7. In the Archive Type drop-down, select WAR File. Enter a name for the deployment profile (in our case genericserviceconsumer), then click OK and confirm the defaults in case pop message appears. 57

8. Confirm OK again on the Deployment profile screen. 9. Now create the manifest file. Go to the project file system and create a file called MANIFEST.MF file within the /src/meta-inf/ folder. (You may need to create the folder itself.) NOTE: This step can be also proceeded in JDeveloper, by creating two folders and then a file. 58

10. Add task flow information to the manifest file, for example: Manifest-Version: 1.0 Created-By: A-Team Implementation-Title: training.generic.taskflow Extension-Name: extend.portal.training.generic.taskflow Specification-Version: 1.0.0 Implementation-Version: 1.0.0 Implementation-Vendor: Oracle 11. Include the manifest file within the project deployment profile. Right-click the Deployer project, select Project Properties, select Deployment, then select the deployment profile. Click Edit to edit the profile. 59

12. On the Edit WAR Deployment Profile screen, select WAR Options, then select the Include Manifest File checkbox. 60

13. Click Add to select the manifest file and add it to the deployment profile. On the new screen, go down to the META-INF folder and select the manifest file, as shown below, then click Open and OK to save. The Deployer project is now ready to deploy the sample task flow. Within the Deployer project you should now see the new MANIFEST.MF file: 61

Step 9: Deploy the Deployer Project with the Sample Task Flow (WAR file) to WebCenter Portal In this step, you ll deploy the sample task flow to the portal server using the Deployer project. Note: Ensure that the WebCenter Portal managed server (11.1.1.8.0) is up and running before starting this step. 1. Right-click the Deployer project, select Deploy, then select the deployment profile you created earlier. 62

2. On the Deployment Action screen, select Deploy to Application Server, then click Next. 3. Select the connection that points to the WebLogic Server where you want to deploy the shared library. In this example, WebCenter Portal runs on VirtualBox (vmwls). 63

4. On the WebLogic Options screen, select the managed server on which WebCenter Portal is deployed (WC_Spaces), as well as the Deploy as a shared library option. 5. Confirm the options and click Finish to deploy the ADF shared library that contains the sample task flow. 64

A deployment log similar to that shown here displays if deployment was successful: 6. Use the WebLogic Administration Console to confirm that the library successfully deployed on the managed server. For example, the screen below shows version 1.0.0 was deployed as specified within the manifest file. NOTE: As shown on the screen above you should see the deployed library in format: extend.portal.training.generic.taskflow, as this was the name specified within the MANIFEST.MF file. On the end of the shared library the version is shown. Before you can use the task flow in WebCenter Portal, you must restart the managed server on which you deployed the task flow. However, before you restart the server you must register the ADF shared library with WebCenter Portal using the WebCenter Portal Server Extension Project, as described in the next section. Note: Make sure that the Generic Web Service example is deployed so you can use it from the task flow. The web service can be installed on any managed server accessible from WebCenter Portal. In this example, the web service is installed on the WebCenter Portal Managed Server and has the following URL: http://localhost:8888/genericwebservice-userwebservice-contextroot/userservicesoap12httpport Test the web service by opening the URL from your browser as shown here: 65

Step 10: Register the Sample Task Flow with WebCenter Portal The ADF shared library file containing your task flow is deployed and ready to use, but the task flow will not appear in the WebCenter Portal resource catalog until you have registered the ADF shared library with WebCenter Portal and restarted the managed server on which WebCenter Portal is deployed. This step describes how to register additional ADF shared libraries with WebCenter Portal using the WebCenter Portal Server Extension Project. 1. To create a new WebCenter Portal Server Extension application, click the New icon, select Applications, and then select WebCenter Portal Server Extension. Click OK. 66

2. On the Name your application screen, enter a name for the application (or keep the default), then click Next. 3. Leave the default settings on the Project 1 Name screen and click Next. 67

4. Either leave the default settings on the Configure Java Settings screen, or enter a new Default Package name if you prefer. 5. Leave the default settings on the Project 2 Name screen, and click Finish. 68

Two projects display in JDeveloper: PortalSharedLibrary. In the following steps you will use the PortalSharedLibrary project to register the ADF shared library that you want to use in WebCenter Portal in weblogic.xml. This project includes a WAR deployment profile called extend.spaces.webapp. Later on, when you deploy to extend.spaces.webapp.war, any additional custom shared libraries that you have registered in weblogic.xml are included as dependencies of extend.spaces.webapp.war and become available in WebCenter Portal. PortalExtension. PortalExtension is a starter project which you can also use to create custom ADF components, such as task flows, data controls, and managed beans. If used, the PortalExtension project is deployed to an ADF Library JAR file and should be added as a dependency to the extend.spaces.webapp.war shared library file generated from the PortalSharedLibrary project. Note: The example in this paper does not use the PortalExtension project. 6. By default, the PortalSharedLibrary project does not have a WebLogic Server Deployment descriptor (weblogic.xml). To create one, right-click the PortalSharedLibrary project, then select New. 69

7. On the New Gallery screen, select Deployment Descriptors, select WebLogic Deployment Descriptor, then click OK. 8. On the Select Descriptor screen, select weblogic.xml, then click Next. 70

9. Select the WebLogic Server version this descriptor must support and click Next. 10. Click Finish to create the deployment descriptor. 71

Now the project includes a weblogic.xml file, in which you can register the ADF shared library JAR file you deployed earlier. 11. If the weblogic.xml file is not open, double click to open it. 12. Select Libraries from the tab menu on the left. You can use the Libraries page to specify the names of any ADF shared libraries that you want to use in WebCenter Portal. Note: Oracle recommends that you specify all ADF shared libraries that you want to use in WebCenter Portal in the same WebCenter Portal Server Extension project. There is no need to create a new project for each shared library. If for some reason you do create multiple WebCenter Portal Server Extension projects, you must change the manifest files configuration (MANIFEST.MF) to have different namespaces, if you deploy to the same WebCenter managed server. 72

13. Register the ADF shared library WAR you deployed earlier by adding the library name and version information (extend.portal.training.generic.taskflow), as shown below. Ensure that the information you specify here matches the version information specified in the Deployer manifest file. Note: You can register multiple ADF shared libraries. However, the components should have different assets and resources names. For example, if you register a second ADF shared library, the project included should have different data binding names. 14. To prevent deployment exceptions, you must increment the implementation version in the MANIFEST.MF file. Open the MANIFEST.MF file and change the implementation version for extend.spaces.webapp.war as shown. 73

Now you can deploy the PortalSharedLibrary project to the WebCenter Portal managed server(s). NOTE: On the screen-shot above we extend the implementation version to higher number 11.1.9, as we did several tests. Every time you redeploy you have to increase that number to be able to install newer version. 74

Step 11: Deploy PotalSharedLibrary to WebCenter Portal 1. Right click PortalSharedLibrary, select Deploy, then select the default deployment profile extend.spaces.webapp. 2. Select Deploy to Application Server, then click Next. 75

3. Select the connection that points to the WebLogic Server where you want to deploy the shared library. In this example, WebCenter Portal runs on VirtualBox (vmwls). Note: This example demonstrates direct deployment from JDeveloper. If you prefer, you can deploy the PortalSharedLibrary project to a WAR file (extend.spaces.webapp.war), then use WLST scripts to deploy the WAR file in your environment. 76

4. On the WebLogic Options screen, select the managed server(s) or cluster on which WebCenter Portal Server is deployed (WC_Spaces in this example), as well as the Deploy as a shared library option. 5. Check that the deployment log has no error messages and the deployment was successful. 77

6. Log in to the WebLogic Server Administration Console and confirm that the project was deployed. 7. Restart the managed server(s) on which WebCenter Portal is running (WC_Spaces, in this example). After restarting the server you will be able to access the sample task flow in WebCenter Portal. 78

Step 12: Register the Web Service Connection with WebCenter Portal The custom sample task flow requires a web service connection, which must be configured in your WebCenter Portal instance. To configure a web service connection for WebCenter Portal: 1. To be able to change and add the new configuration, you should use Enterprise Manager (EM). Log in to EM with sufficient user rights. 2. Go to WebCenter->Portal->Spaces, then click on the WebCenter Portal application. 79

3. From the WebCenter Portal menu, select ADF->Configure ADF Connections. 4. Add a new web service connection with the same name (GenericUserWebServiceConnection) as that used in the ProxyFacade.java class (see screen shot below). Click the Create Connection button to create the connection. 80

5. The new connection should appear within the Web Service Connections section. Click the connection name, and then click the Edit icon. 81

6. Specify the connection properties as shown below, and then click OK to confirm. 7. Click the Apply button to apply the settings to MDS. 82

Note that you do not have to restart the server after you create this connection. Note: To move connections between environments, you can use the WLST command importwebcenterportalconnections, which was introduced with the WebCenter Portal 11.1.1.8 release. For more information about the connection property files, follow this link. Step 13: Add the Sample Task Flow to a WebCenter Portal Resource Catalog To make the sample task flow available for someone to drag and drop onto a portal page, you must add it to a resource catalog: Note: This example adds the task flow to a shared resource catalog (sometimes referred to as an application-level resource catalog). You can add task flows to portal-level resource catalogs as well. 1. Log in to WebCenter Portal as an Administrator or Application Specialist (that is, you must have permissions to edit shared resource catalogs). Select Administration >Shared Assets->Resource Catalogs. 2. Copy one of the default catalogs so you can change it. In this example, a copy of the Default Home Portal Catalog is named ATeam Home Portal Catalog. 83

3. Click Edit. 4. In the Edit Catalog window, click Add, then select Add From Library. 84

5. In the list of resources, click Task Flows, then expand the Design Time folder. 6. Search for the sample task flow in the tree. The name of the task flow is the same as the one used when the task flow was created; for example, generic-service-task-flow. Select it and click Add to add it to the resource catalog. 85

Note: The Edit Resource Catalog window allows you to sort or order the resources. It is possible, for example, to create a new folder and include the task flow inside. The task flow displays in the list as shown above. Now the task flow can be consumed on portals, which are using the same resource catalog. Note: The resource catalog must be assigned as the default resource catalog for the portal, which should have access to the new task flow. 86

7. Create a new page, switch to edit mode, and then drag and drop the task flow from the resource catalog on to the page. 8. Save the page and test the task flow. You can also test the task flow using the page preview functionality as shown bellow: 87

Step 14: Change the Sample Task Flow and Redeploy If changes are applied to the task flow, you must redeploy an updated ADF library JAR file with the task flow updates. To do this: 1. Update the sample task flow. For example, add a table that displays the users delivered from the web service. 88

2. Test the task flow locally as discussed earlier in this paper, by creating a test page and binding a region with the task flow. 3. Run the test page to test the task flow changes locally. If the test was successful, you can deploy the updated task flow to the portal server. 89

4. Deploy the ViewController project to an ADF library JAR file, as shown here. There is no need to change the deployment profile. 5. Refresh the ADF shared library dependencies from the Deployer project. 90

6. Make sure that the GenericServiceConsumer library updates as well. 7. Increase the implementation version in the Deployer manifest file to prevent deployment conflicts. IMPORTANT: Make sure that there are NO changes to WEB.XML in the Deployer project. If there are any changes, you must remove them. If you do not, you will not be able to start the WebCenter Portal Server properly after redeployment and you will get an error message, which is shown in the Troubleshooting section at the end of this document. 91

Remove the WEB.XML content, if any, as shown above. 8. Redeploy the ADF shared library WAR file to the WebCenter Portal managed server or cluster. Use the same deployment profile you created earlier. 92

9. In the WebCenter Portal Server Extension project, reference the new shared library version in weblogic.xml as shown: 10. Increment the WebCenter Portal Server Extension version in the manifest.mf file. 93

11. Deploy the updates to the PortalSharedLibrary project to the WebCenter Portal managed server or cluster. 12. Restart the WebCenter Portal managed server(s) or cluster, to make the changes available. NOTE: The updated task flow automatically becomes available in WebCenter Portal. You do not need to add the task flow to the resource catalog again. 13. Open the page containing the sample task flow to confirm that the latest, updated task flow displays. 94

Troubleshooting Issue: The following error message displays if the web.xml file in the Deployer project contains an invalid configuration: [WC_Spaces] [NOTIFICATION] [J2EE JSP-00008] [oracle.j2ee.jsp] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.default (self-tuning)'] [userid: anonymous] [ecid: 004uUEj1iPaFw000jzwkno00023J0000Zw,0:1] [APP: webcenter#11.1.1.4.0] [URI: /webcenter/] unable to dispatch JSP page: The following exception occurred:.[[ oracle.jsp.parse.javacodeexception: Line # 13, oracle.jsp.parse.jspparsetagscriptlet@1d1311fe Error: Java code in jsp source files is not allowed in ojsp.next mode. at oracle.jsp.parse.jspparsetagcore.createnode(jspparsetagcore.java:263) at oracle.jsp.parse.jsputils.createchildnodes(jsputils.java:2511) at oracle.jsp.parse.jspparsetagfile.createtree(jspparsetagfile.java:475) at oracle.jsp.parse.oraclejsp2java.transformimpl(oraclejsp2java.java:535) at oracle.jsp.parse.oraclejsp2java.transform(oraclejsp2java.java:593) at oracle.jsp.runtimev2.jsppagecompiler.attemptcompilepage(jsppagecompiler.java:691) at oracle.jsp.runtimev2.jsppagecompiler.compilebothmodes(jsppagecompiler.java:490) at oracle.jsp.runtimev2.jsppagecompiler.parseandgettreenode(jsppagecompiler.java:457) at oracle.jsp.runtimev2.jsppageinfo.compileandload(jsppageinfo.java:624) at oracle.jsp.runtimev2.jsppagetable.compileandserve(jsppagetable.java:645) at oracle.jsp.runtimev2.jsppagetable.service(jsppagetable.java:389) at oracle.jsp.runtimev2.jspservlet.internalservice(jspservlet.java:842) at oracle.jsp.runtimev2.jspservlet.service(jspservlet.java:766) at javax.servlet.http.httpservlet.service(httpservlet.java:821) at weblogic.servlet.internal.stubsecurityhelper$servletserviceaction.run(stubsecurityhelper.java: 227) at weblogic.servlet.internal.stubsecurityhelper.invokeservlet(stubsecurityhelper.java:125) at weblogic.servlet.internal.servletstubimpl.execute(servletstubimpl.java:301) at weblogic.servlet.internal.servletstubimpl.execute(servletstubimpl.java:185) at weblogic.servlet.internal.requestdispatcherimpl.invokeservlet(requestdispatcherimpl.java:52 6) at weblogic.servlet.internal.requestdispatcherimpl.forward(requestdispatcherimpl.java:253) at weblogic.servlet.internal.servletresponseimpl.senderror(servletresponseimpl.java:731) at oracle.jsp.runtimev2.jspreportutil.senderror(jspreportutil.java:144) at oracle.jsp.runtimev2.jspreportutil.reportexception(jspreportutil.java:201) 95

at oracle.jsp.runtimev2.jsppagetable.compileandserve(jsppagetable.java:694) at oracle.jsp.runtimev2.jsppagetable.service(jsppagetable.java:389) at oracle.jsp.runtimev2.jspservlet.internalservice(jspservlet.java:842) at oracle.jsp.runtimev2.jspservlet.service(jspservlet.java:766) at javax.servlet.http.httpservlet.service(httpservlet.java:821) at weblogic.servlet.internal.stubsecurityhelper$servletserviceaction.run(stubsecurityhelper.java: 227) at weblogic.servlet.internal.stubsecurityhelper.invokeservlet(stubsecurityhelper.java:125) at weblogic.servlet.internal.servletstubimpl.execute(servletstubimpl.java:301) at weblogic.servlet.internal.tailfilter.dofilter(tailfilter.java:27) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at oracle.adf.library.webapp.libraryfilter.dofilter(libraryfilter.java:181) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at oracle.wcps.client.personalizationfilter.dofilter(personalizationfilter.java:74) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at oracle.webcenter.content.integration.servlets.contentservletfilter.dofilter(contentservletfilte r.java:168) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at oracle.security.jps.ee.http.jpsabsfilter$1.run(jpsabsfilter.java:119) at oracle.security.jps.util.jpssubject.doasprivileged(jpssubject.java:324) at oracle.security.jps.ee.util.jpsplatformutil.runjaasmode(jpsplatformutil.java:460) at oracle.security.jps.ee.http.jpsabsfilter.runjaasmode(jpsabsfilter.java:103) at oracle.security.jps.ee.http.jpsabsfilter.dofilter(jpsabsfilter.java:171) at oracle.security.jps.ee.http.jpsfilter.dofilter(jpsfilter.java:71) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at oracle.dms.servlet.dmsservletfilter.dofilter(dmsservletfilter.java:163) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at oracle.security.jps.ee.http.jpsabsfilter$1.run(jpsabsfilter.java:119) at oracle.security.jps.util.jpssubject.doasprivileged(jpssubject.java:324) at oracle.security.jps.ee.util.jpsplatformutil.runjaasmode(jpsplatformutil.java:460) at oracle.security.jps.ee.http.jpsabsfilter.runjaasmode(jpsabsfilter.java:103) at oracle.security.jps.ee.http.jpsabsfilter.dofilter(jpsabsfilter.java:171) at oracle.security.jps.ee.http.jpsfilter.dofilter(jpsfilter.java:71) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at weblogic.servlet.internal.requesteventsfilter.dofilter(requesteventsfilter.java:27) at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:57) at weblogic.servlet.internal.webappservletcontext$servletinvocationaction.wraprun(webappse rvletcontext.java:3730) at 96

weblogic.servlet.internal.webappservletcontext$servletinvocationaction.run(webappservletc ontext.java:3696) at weblogic.security.acl.internal.authenticatedsubject.doas(authenticatedsubject.java:321) at weblogic.security.service.securitymanager.runas(securitymanager.java:120) at weblogic.servlet.internal.webappservletcontext.securedexecute(webappservletcontext.java: 2273) at weblogic.servlet.internal.webappservletcontext.execute(webappservletcontext.java:2179) at weblogic.servlet.internal.servletrequestimpl.run(servletrequestimpl.java:1490) at weblogic.work.executethread.execute(executethread.java:256) at weblogic.work.executethread.run(executethread.java:221) ]] Solution: Remove the invalid configuration within the Deployer WEB.XML file. The file should look like shown below: 97

Development Lifecycle for Task Flows in Oracle WebCenter Portal 11gR1 verson 11.1.1.8.0 December 2013 Author: Lyudmil Pelov Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 Copyright 2013, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. oracle.com 98