19 Managing Pagelet Producer

Oracle WebCenter Portal’s Pagelet Producer (previously called Oracle WebCenter Ensemble) provides a collection of useful tools that facilitate dynamic pagelet development and deployment. The Pagelet Producer proxy provides users with external access to internal resources including internal applications and secured content. Using the Pagelet Producer, you can expose WSRP portlets and OpenSocial gadgets as pagelets for use in any web page or application.

This chapter describes how to register, edit and deploy pagelets using the Pagelet Producer Administrative Console.

This chapter includes the following topics:

For information about developing and deploying pagelets, see Working with Pagelets in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

Permissions

To perform the tasks in this chapter, you must be granted the WebLogic Server Admin role through the Oracle WebLogic Server Administration Console and the Administrator role granted through Oracle WebCenter Portal Administration.

For more information about roles and permissions, see Understanding Administrative Operations, Roles, and Tools.

19.1 About Pagelet Producer

This section is an introduction to Pagelet Producer concepts and features and includes the following topics:

19.1.1 Overview

Pagelet Producer (previously known as Oracle WebCenter Ensemble) can be used to create pagelets to expose platform-specific portlets in other web environments, including WebCenter Portal applications. Pagelet Producer provides a collection of useful tools and features that facilitate dynamic pagelet development. For information about Pagelet Producer architecture, component descriptions, and Pagelet Producer requirements, see Introduction to Pagelets in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

Pagelet Producer registration is dynamic. Additions and updates to existing producers are immediately available; in most cases, it is not necessary to restart the application or the managed server.

Note:

In the current release, only a single administrator can modify Pagelet Producer administrative settings at any given time. Concurrent edits will result in only one edit succeeding. However, data integrity will always be preserved.

19.1.2 Using the Pagelet Producer Console

The Pagelet Producer Console is a browser-based administration tool used to create and manage the various objects in your Pagelet Producer deployment. From the Console you can register web applications as resources, create pagelets, manage proxy and transformation settings, and more.

  • From WebCenter Portal, you can access the Pagelet Producer Console from the Shared Assets page.

    Note:

    Pagelet Producer Console supports the standard administration languages and Dutch only. If you configure the browser language to something other than one of these languages, it will revert to the language defined for the current server.

  • The Pagelet Producer Console is also accessible from any web browser at the following URL:

    http://host:port/pagelets/admin

    The Pagelet Producer Console can also be launched in accessibility mode at:

    http://host:port/pagelets/admin/accessible

For more information about using the Pagelet Producer Console to configure Pagelet Producer, see Configuring Pagelet Producer Settings in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

19.1.3 Exposing WSRP Portlets

Using Pagelet Producer, you can expose WSRP portlets as pagelets for use in any web page or application.

After setting up Pagelet Producer as described in Configuring Pagelet Producer Settings in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper, follow the steps below to import WSRP portlets:

  1. Register the portlet producer with the Pagelet Producer as described in Registering WSRP Portlet Producers in Pagelet Producer.

  2. This automatically creates a resource and pagelets in the Pagelet Producer Console based on the portlet definitions for the producer. For details on resource settings, see Creating Resources in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

  3. To modify the imported resource or the associated pagelets, you must make a copy of the imported resource. For details, see Using Portlet-Based Pagelets.

You can also you the same steps to expose Oracle PDK-Java portlets.

19.1.4 Exposing OpenSocial Gadgets

Using Pagelet Producer, you can expose OpenSocial gadgets as pagelets for use in any web page or application. For more information, see How to Configure OpenSocial Resources (OpenSocial Gadget Producers) and How to Configure OpenSocial Settings in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

19.1.5 Exposing WebCenter Interaction Portlets

Pagelet Producer can be used as a portlet provider for Oracle WebCenter Interaction. There are several configuration pages that allow you to define CSP settings for use with Oracle WebCenter Interaction. For details on configuring these settings and objects, see How to Configure a WCI Data Source and Consuming a Pagelet in WebCenter Interaction (an Example) in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

  1. Configure Pagelet Producer settings for use with the Oracle WebCenter Interaction Credential Mapper, SOAP API service and image service on the CSP Settings page in the Pagelet Producer Console.

  2. Set up the Pagelet Producer's connection to the server hosting the portlet code by creating a "CSP" resource.

  3. Create pagelets for Oracle WebCenter Interaction portlets.

19.2 Registering Pagelet Producer

This section describes how to register and configure Pagelet Producer using Fusion Middleware Control and WLST commands.

This section includes the following subsections:

For information about developing and deploying pagelets, see Working with Pagelets in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

19.2.1 Registering Pagelet Producer Using Fusion Middleware Control

To register Pagelet Producer using Fusion Middleware Control:

  1. Log in to Fusion Middleware Control and navigate to the WebCenter Portal home page. For more information, see Navigating to the Home Page for WebCenter Portal.

  2. From the WebCenter Portal menu, select Register Producer.

  3. Enter connection details for Pagelet Producer (Table 19-1 ).

    Table 19-1 Pagelet Producer Connection Parameters

    Field Description

    Connection Name

    A unique name to identify this Pagelet Producer instance within the application. The name must be unique across all WebCenter Portal connection types. The name specified here appears in Composer under the UI Components > Pagelet Producers folder (by default).

    Producer Type

    Select Pagelet Producer.

    Server URL

    The URL to Pagelet Producer. The URL must include a fully-qualified domain name. Use the following syntax:

    <protocol>://<host_name>:<port_number>/pagelets/

    For example:

    http://myhost.com:7778/pagelets/

    If pagelets contain secure data, the registered URL must use the https protocol. For example:

    https://myhost.com:7779/pagelets/

    The context root can be changed from /pagelets/ if necessary; for details, see Redeploying Pagelet Producer to a Different Context.

    Note: In WebCenter Portal, if the Pagelet Producer URL is protected by OAM, the URL to the pagelet catalog must be excluded (mapped directly without access control), or the catalog will appear to be empty when using REST. The pagelet catalog URL is http://<host_name>:<port_number>/ pagelets/api/v2/ensemble/pagelets

  4. Click OK. The new producer appears in the connection table.

19.2.2 Registering Pagelet Producer Using WLST

Use the registerPageletProducer command to register Pagelet Producer for your WebCenter Portal application. For command syntax and examples, see registerPageletProducer in WebCenter WLST Command Reference.

You can also use WLST to list or edit the current connection details.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

19.2.3 Configuring the Pagelet Producer Service for WebCenter Portal

This section describes how to set up Pagelet Producer for use as a service by Oracle WebCenter Portal using the Oracle Configuration Wizard.

To set up Pagelet Producer as a WebCenter Portal service:

  1. Launch the Configuration Wizard by selecting Oracle Fusion Middleware > Oracle WebLogic Server > Tools > Configuration Wizard.

  2. Select Extend an existing WebLogic Domain and then click Next.

  3. Select Base this domain on an existing template and select the Pagelet Producer domain template. Confirm that the template location is correct and click Next.

  4. Complete the domain configuration wizard. For details, see the online help.

All post deployment connection configuration is stored in the Oracle Metadata Services (MDS) repository. For more information, see Oracle WebCenter Portal Configuration Considerations. For detailed information about MDS, see Managing the MDS Repository in Administering Oracle Fusion Middleware.

Pagelet Producer stores all configuration data on a separate partition in the MDS schema of RCU. Typically, this schema is installed as part of the Oracle WebCenter Portal installation. This configuration data does not conflict with data that belongs to other services. When the Pagelet Producer domain template is deployed, the wizard prompts for connectivity information to the database in which the schema has been created. The names that Pagelet Producer expects are:

  • Datasource Name: mds-PageletProducerDS

  • JNDI name: jdbc/mds/PageletProducerDS

  • MDS partition name: pageletproducer

To use OpenSocial gadgets in conjunction with WebCenter Portal profile and activities features, you must manually configure the WebCenterDS data source to target the WC_Portlet server.

  1. In the Oracle WebLogic Server Console, go to Services > Data Source.

  2. Click on the WebCenterDS data source.

  3. Go to the Targets tab.

  4. Select the WC_Portlet server and click Save.

19.2.4 Registering Pagelet Producer Using WebCenter Portal

This section explains how to register Pagelet Producer in WebCenter Portal.

Log in to WebCenter Portal and click Administration.

Navigate to the Tools and services

Click Portlet producers

  1. Log in to WebCenter Portal and click Administration.

  2. Navigate to the Configuration tab and click Tools and Services.

  3. On the Services and Providers page, click Portlet Producers.

  4. Click Register and select Pagelet Producer.

  5. Enter the connection details for Pagelet Producer (Table 19-2 ).

    Table 19-2 Pagelet Producer Connection Parameters

    Field Description

    Producer Name

    A unique name to identify this Pagelet Producer instance within WebCenter Portal.

    Server URL

    The URL to the Pagelet Producer. The URL must include a fully-qualified domain name. Use the following syntax:

    <protocol>://<host_name>:<port_number>/pagelets/ where host and port correspond to the WC_Portlet managed server where Pagelet Producer is configured.

    For example:

    http://myhost.com:7778/pagelets/

    If pagelets contain secure data, the registered URL must use the HTTPS protocol. For example:

    https://myhost.com:7779/pagelets/

    The context root can be changed from /pagelets/ if necessary; for details, see Redeploying Pagelet Producer to a Different Context.

    Note: In WebCenter Portal, if the Pagelet Producer URL is protected by OAM, the URL to the pagelet catalog must be excluded (mapped directly without access control), or the catalog will appear to be empty when using REST. The pagelet catalog URL is http://<host_name>:<port_number>/ pagelets/api/v2/ensemble/pagelets

19.2.5 Redeploying Pagelet Producer to a Different Context

In some cases, the default web context defined for the Pagelet Producer may need to be changed. This section describes how to redeploy Pagelet Producer to a different context.

The first step is to target the Pagelet Producer data source to the Administration Server and locate the Pagelet Producer EAR file.

  1. In the Oracle WebLogic Server Console, go to Services > Data Source.

  2. Click the mds-PageletProducerDS data source.

  3. Go to the Targets tab.

  4. Check the box next to AdminServer and click Save.

  5. Navigate to Deployments/pagelet-producer.

  6. If Fusion Middleware Control is running on the same host as Pagelet Producer, record the path to the EAR file. If Fusion Middleware Control is on a different host than Pagelet Producer, copy the EAR file from the Pagelet Producer host machine to the browser host machine.

Next, use Fusion Middleware Control to redefine the context:

  1. Navigate to (Application) Deployments/pagelet-producer.

  2. From the Application Deployment Menu, select Application Deployment > Undeploy and follow any prompts that appear. Click Undeploy.

  3. From the Weblogic Domain menu, select Application Deployment > Deploy.

  4. Set the Archive location to the Pagelet Producer EAR file (located and/or copied in the first set of steps above).

    • If Fusion Middleware Control is running on the same host as the Pagelet Producer, select the second option and browse to the EAR file location.

    • If Fusion Middleware Control is on a different host than Pagelet Producer, select the first option and click Choose File to select the EAR file from the location it was copied to on the browser host machine.

  5. Select WC_Portlet.

  6. Change the Context Root of the Web Modules as follows, where "new_context" is the web context that should be used (to redeploy to root, omit "new_context"):

    • ensemblestatic.war: new_context/ensemblestatic

    • pageletadmin.war: new_context/admin

    • opensocial.war: new_context/os

    • loginserver.war: new_context/loginserver

    • ensembleproxy.war: new_context/

    Note:

    OpenSocial pagelets will not function properly if Pagelet Producer is deployed to root context.

  7. Click Deploy.

If your implementation uses OpenSocial, update the context setting in the Pagelet Producer Console. For details, see How to Configure OpenSocial Settings in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

19.3 Registering WSRP Portlet Producers in Pagelet Producer

The Pagelet Producer can expose WSRP portlets as pagelets for use in Oracle WebCenter Portal and third-party portals, but before you can use a portlet producer as a pagelet, you must first register it.

To register a WSRP portlet producer using Fusion Middleware Control:

You can use the Pagelet Producer Console to register a WSRP endpoint as a portlet producer, or you can also use Fusion Middleware Control, WLST, or the WebCenter Administration page as described in Managing Portlet Producers. After registration, a new Pagelet Producer resource is created and automatically populated with pagelets to represent the portlets associated with the WSRP endpoint.

Note:

After registrering the portlet producer, make a copy of the portlet resource and rename the copy of the resource for use in the Oracle WebCenter Portal.

To access portlet producer settings from the Pagelet Producer Console.

  1. Log into WebCenter Portal as an administrator and go to the Administration page.

  2. Open the Shared assets tab and select Pagelets.

  3. Click Create and log into Pagelet Producer.

  4. From the Navigator toolbar menu, select Producers and click Register.

    Pagelet Producer
  5. On the Register Portlet Producer page, enter the registration details for the producer. See WSRP Producer Connection Parameters for detailed parameter information.

    Register Portlet Producer page
  6. Click Test to test the settings, then click Ok when you’re ready to register the producer or Cancel to return to the Pagelet Producer Console.

19.4 Using Portlet-Based Pagelets

Auto-generated portlet resources and pagelets cannot be modified. To make changes and create a permanent reference to the producer, the auto-generated asset must first be copied. Select the asset on the Shared Assets page and select Copy from the Actions menu. The copied version of the resource can be edited, and various elements such as injectors can be added to customize pagelet functionality. Any replicated resources will be included in metadata exports.

You can also define a portlet-based pagelet from scratch by creating a new resource based on an existing portlet producer and then creating individual pagelets. For details, see Consuming WSRP Portlets as Pagelets in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.

19.5 Configuring the Trust Service Identity Asserter

This section describes how to configure the trust service identity asserter.

This section includes the following topics:

19.5.1 About the Trust Service Identity Asserter

The WebCenter Portal communicates with a Pagelet Producer using a server to server REST call. In order to pass the identity of the administrative user to the Pagelet Producer a WLS "Trust Service Identity Asserter" must be set up on the Pagelet Producer (server) and OPSS keystore service credentials must be set up on both the Pagelet Producer (server) and WebCenter Portal (client). For more information, see Integrating Application Security with OPSS in Securing Applications with Oracle Platform Security Services.

19.5.2 Preparing for Configuring the Trust Service Identity Asserter

The WebCenter Portal installation (same installer is used for both the WebCenter Portal and the Pagelet Producer) will place the following two files in the WCP_HOME/webcenter/scripts directory (for example, /home/user/Oracle/Middleware/Oracle_WC1/webcenter/scripts):

  • configureTrustServiceIdentityAsserter.py

  • configureTrustServiceIdentityAsserter.properties

The WLST script configureTrustServiceIdentityAsserter.py uses the values set in the configureTrustServiceIdentityAsserter.properties file to configure trust identity on both the client (WebCenter Portal) and server (Pagelet Producer).

Properties to Fill Out

The following properties must be filled out before executing configureTrustServiceIdentityAsserter.py:

Table 19-3 Properties Used by configureTrustServiceIdentityAsserter.py

Property Description Example Value

admin.user

WLS administrative user

weblogic

admin.password

WLS administrative user password

welcome1

admin.url

WLS administrative server host url

t3://localhost:7001

trust.alias

Keystore alias name that will contain private key pair used for signing token used in REST calls. Use alphanumeric characters.

wckey

trust.issuer

This is the value placed inside the token that indicates who the issuer of the token is

mycompany

keystore.exported.cert

This is a file path where the public key for the key pair in trust.alias is exported to and exported from.

/home/user/Oracle/Middleware/user_projects/domains/my_domain/config/fmwconfig/wckey.cer

In addition to the above properties there are several optional properties defined in configureTrustServiceIdentityAsserter.properties. If these properties are not defined in the file the values listed under 'Default Value' column below will be used:

Table 19-4 Properties Used by configureTrustServiceIdentityAsserter.py

Original Property Description Default Value

keystore.distinguished.name

DN used in keystore key pair generation

CN=<property value of trust.issuer>,O=Oracle,C=US

trust.identity.asserter.name

Name to give the WLS Trust Service Identity Asserter

TrustServiceIA

For more details, open the configureTrustServiceIdentityAsserter.properties file. A full description of each property and the overall trust identity assertion configuration process is provided in inline comments.

19.5.3 Executing Trust Service Identity Asserter Configuration

WebCenter Portal and Pagelet Producer on same WLS Domain

In most deployment scenarios, the Pagelet Producer and WebCenter Portal run on separate WebLogic managed servers on the same WebLogic domain. In this scenario, the OPSS keystore configuration runs once and handles both the client (WebCenter Portal) and server (Pagelet Producer) set up as shown in the following examples:

cd WCP_ORACLE_HOME/webcenter/scripts
WCP_ORACLE_HOME/common/bin/wlst.sh ./configureTrustServiceIdentityAsserter.py ./configureTrustServiceIdentityAsserter.properties

Note that for Windows environments the .sh is not needed.

19.6 Managing Import, Export, Backup and Recovery of Pagelet Producer Components

Pagelet Producer stores data related to its configuration and content in the Oracle metadata store (MDS) to facilitate disaster recovery and the full production lifecycle from development through staging and production. This section describes the import, export and backup capabilities available.

For detailed information about MDS, see Managing the Oracle Metadata Repository in Administering Oracle Fusion Middleware.

19.6.1 Exporting and Importing Pagelet Producer Resources

Pagelet Producer assets can be exported and imported using the Pagelet Producer Console. Note that you cannot export or import pagelets directly from the Shared Assets page in WebCenter Portal. To export or import Pagelet Producer shared assets you must use the Pagelet Producer Console as described in this section, or use WLST as described in Exporting and Importing Pagelet Producer Metadata Using WLST.

To import or export Pagelet Producer assets using the Pagelet Producer Console:

  1. Open the Pagelet Producer Console in either of the following ways:

    • From WebCenter Portal, navigate to Administration > Shared Assets > Pagelets. Click Create and then click Continue to open the Pagelet Producer Console. When you're ready to return to WebCenter Portal click Cancel.

    • Navigate to the following URL:

      http://<host_name>:<port_number>/pagelets/admin.

  2. From the Jump to: dropdown list, select Export/Import.

  3. Click either Export, Import, or Variables to select the activity to be performed:

    • Use the Export pane to choose from a list of assets and export them to a new MDS package.

    • Use the Import pane to browse to an existing MDS package and import it into Pagelet Producer.

    • Use the Variables pane to define variables for root URLs to protect internal URLs and simplify import.

  4. To export resources, click Export.

    The Export pane displays (see Figure 19-1 )

    Figure 19-1 Pagelet Producer Console - Export Pane

    Description of Figure 19-1 follows
    Description of "Figure 19-1 Pagelet Producer Console - Export Pane"
    1. Check the items to include in the export.

    2. Click Next.

      The Host URL displays (Figure 19-2 ):

    3. Enter the URL for the Host (click the Variable field to use a variable if you've defined one) and then click Export.

  5. To import resources, click Import.

    The Import pane displays (see Figure 19-1 ).

    Figure 19-3 Pagelet Producer Console - Import Options

    Description of Figure 19-3 follows
    Description of "Figure 19-3 Pagelet Producer Console - Import Options"
    1. Click Browse to select the file to import.

    2. Click Submit to start the import.

    3. If prompted, select either Skip or Overwrite if there is an existing resource on the target side of the import.

  6. To define a variable, click Variables.

    The Variables pane displays (Figure 19-4 ).

    Figure 19-4 Pagelet Producer Console - Variables Pane

    Description of Figure 19-4 follows
    Description of "Figure 19-4 Pagelet Producer Console - Variables Pane"
    1. Click Add Variable.

    2. Enter the host name in the Host field.

    3. Enter the variable name with which to associate the host URL in the Variable field.

    4. To continue adding variables, click Add Variable.

      Once added, you can use the variables as part of the host URL in the Export pane.

19.6.2 Exporting and Importing Pagelet Producer Metadata Using WLST

The metadata created by Pagelet Producer is stored in MDS and can be accessed using WLST. For detailed information on running WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Only global migration using WLST is currently supported; all data in the source environment is included in the exported MDS package, and all data in the target environment is overwritten when the package is imported.

Note:

If you are migrating your WebCenter Portal implementation from staging to production, exporting and importing Pagelet Producer data is handled by the migration tool. However, if changes were made to Pagelet Producer objects in the staging environment, these changes must be migrated independently using the WLST commands described in this section. If Pagelet Producer does not function after migration, check the Server URL defined for Pagelet Producer in your WebCenter Portal application. For information on setting this URL, see Registering Pagelet Producer. For details on WebCenter Portal migration, see Understanding WebCenter Portal Life Cycle.

19.6.2.1 Exporting Pagelet Producer Metadata Using WLST

To export base documents for Pagelet Producer, including any resources, pagelets and custom configuration settings, use the WLST command exportMetadata.

For example:

exportMetadata(application='pagelet-producer', server='WC_Portlet_Staging', toLocation='c:\work\myexport', docs='/**')

Where:

  • application: Name of the Pagelet Producer application for which the metadata is to be exported (for example, pagelet-producer).

  • server: Server on which Pagelet Producer is deployed (for example, WC_PortletStaging).

  • toLocation: Target directory to which documents selected from the source partition are to be exported. The toLocation parameter can be used as a temporary file system for migrating metadata from one server to another.

  • docs: List of comma-separated fully qualified document name(s) and/or document name patterns (* and ** patterns).

For detailed syntax and examples, see exportMetadata in WebCenter WLST Command Reference.

19.6.2.2 Importing Pagelet Producer Metadata Using WLST

To import Pagelet Producer metadata and customizations, use the WLST command importMetadata.

For example:

importMetadata(application='pagelet-producer', server='WC_Portlet_Production', fromLocation='c:\work\myexport', docs='/**')

Where:

  • application: Name of the Pagelet Producer application for which the metadata is be imported (for example, pagelet-producer).

  • server: Name of the target server on which Pagelet Producer is deployed (for example, WC_Portlet_Production).

  • fromLocation: Source directory from which documents are imported. The fromLocation parameter can be any temporary file system location for migrating metadata from one server to another.

  • docs: List of comma separated fully qualified document name(s) and/or document name patterns (* and ** patterns).

For detailed syntax and examples, see importMetadata in WebCenter WLST Command Reference.

Note:

Any environment-specific URLs used in object configuration must be updated manually after import.

19.6.3 Backing Up and Restoring Pagelet Producer

Backup and recovery operations for Pagelet Producer are part of standard MDS backup and restoration and can be managed through database export and import utilities, and various other tools. For detailed information, see Advanced Administration: Backup and Recovery in Administering Oracle Fusion Middleware.

By default, the MDS configuration for Pagelet Producer is as follows (from adf-config.xml):

<metadata-store name="PageletProducerMetadataRepos" class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
  <property name="partition-name" value="pageletproducer"/>  <property name="jndi-datasource" value="jdbc/mds/PageletProducerDS"/>
  <property name="repository-name" value="mds-PageletProducerDS"/> </metadata-store>