12 Publishing with Oracle WebCenter Sites

Publishing with Oracle WebCenter Sites makes content available to the visitors of your online site by copying from the management system to the delivery system. Copying content from one system to another is called publishing.

The WebCenter Sites publishing system supports three publishing methods: Export to Disk, Mirror to Server, and Export to XML. WebCenter Sites also provides an approval system that determines which content gets published, a scheduling function that enables you to set the publication time, and a utility for configuring site-specific publishing destinations.

This chapter describes the publishing and approval systems. It contains the following sections:

Note:

The following feature is deprecated in WebCenter Sites 11g Release 1 (11.1.1.8.0): Mirror publishing. This feature is replaced by RealTime publishing.

12.1 Overview

Before assets can be published, either you or WebCenter Sites must determine the following information:

  • Which publishing method WebCenter Sites should use: Export to Disk, Mirror to Server, or Export Assets to XML.

    As an administrator, you specify the publishing method for the destination when you configure the publishing destination. For more information, see Section 12.2, "Publishing Methods."

  • The publishing destination WebCenter Sites should publish to during a given session.

    As an administrator, you configure the publishing destinations for your system. For more information, see Section 12.3, "Publishing Destinations."

  • Which assets have been approved and are ready to be published to the current destination. The approval system determines this information.

    When an asset is deemed ready for publication, a content provider marks it as approved for a specific publishing destination. The approval system validates the approved label to determine whether publishing the asset is likely to create broken links on the live site. If the potential for broken links exists, the asset is held back from the publishing session until its dependencies on other assets are resolved by the user approving those assets, as well. If the approved asset either has no dependencies or its dependencies are satisfied, the approval system releases the asset to the publishing system.

    The approval system's process is complex and varies from one publishing method to another. For detailed information about the workings of the approval system, see Chapter 13, "The Approval System" and Chapter 14, "Various Topics in Export to Disk Publishing and the Approval Process."

  • When assets should be published.

    As an administrator, you set up the publishing schedule. The publishing process runs as a batch process that you schedule to occur at regularly-occurring intervals. On an as-needed basis, you can also override the schedule and publish on demand. For more information about publishing schedules, see Section 12.5, "The Publishing Schedule."

During a publishing session, the session information is recorded in log files. You can monitor the session through the Publish Console to determine both the publishing history and the status of currently running publishing sessions. You can also use your browser to complete other administrative tasks, as the publishing process runs in the background. For information about the events that occur during a publishing session, see Section 12.6, "What Happens During a Publishing Session?" For information on how to obtain publishing information, see Section 12.7, "Obtaining Information About a Publishing Session."

12.2 Publishing Methods

This section describes the publishing methods that WebCenter Sites supports. Figure 12-1, Figure 12-2, and Figure 12-3 summarize the publishing methods.

  • For Export to Disk publishing, the delivery system is a web server. Publishing to this type of system is done as follows:

Approved assets in the CM system database are rendered by templates into HTML files. The files are saved to a file system and subsequently published to the web server by an administrator using a transfer protocol, such as FTP.

When published content is requested by site visitors, the HTML files are served as pages to the browser.

  • For Mirror to Server publishing, the delivery system is a WebCenter Sites system. Publishing to this type of system is done as follows:

Approved assets and their database tables are mirrored from the CM system database to the delivery system database. Throughout the publishing session, the publishing system communicates and cooperates with the CacheManager on the delivery system. The CacheManager is a WebCenter Sites servlet that manages a system's page cache. CacheManager ensures caching of the pagelets or pages that refer to the assets which will be mirrored. After the publishing session concludes, CacheManager generates those pages again to display the updated content, and caches the new pages and pagelets.

When published content is requested by site visitors, it is provided on-the-fly. The content is drawn from the delivery system database by templates and served to the browser, where it is finally rendered as pages.

  • For Export Assets to XML, the delivery system is a database or an external system running an application other than WebCenter Sites. The publishing method is a data transformation method that outputs XML files. Rather than creating pages that are ready to be displayed by a web server, this publishing method uses the Export API to create one XML file for each approved asset.

    When published content is requested by site visitors, it is provided on-the-fly. The content is drawn from the delivery system database by templates and served to the browser, where it is finally rendered as pages.

These chapters describe each publishing method in detail:

Figure 12-1 Export to Disk Publishing

Description of Figure 12-1 follows
Description of ''Figure 12-1 Export to Disk Publishing''

Figure 12-2 Mirror to Server Publishing

Description of Figure 12-2 follows
Description of ''Figure 12-2 Mirror to Server Publishing''

Figure 12-3 Export to XML Publishing

Description of Figure 12-3 follows
Description of ''Figure 12-3 Export to XML Publishing''

12.3 Publishing Destinations

A publishing destination is either the WebCenter Sites database to which you are mirroring content, or a directory to which you are exporting. A publishing destination is expressed as a named object that defines the following parameters:

  • A publishing method (Export to Disk, Mirror to Server, or Export Assets to XML)

  • A location

    • For Export to Disk publishing and Export Assets to XML, the publishing system converts the approved assets into HTML or XML files. The location is the root directory to which the files are saved. You set this directory with the cs.pgexportfolder property in the futuretense.ini file.

    • For Mirror to Server publishing, the destination is the server name in URL format (including the port number) of the server that is supposed to deliver the content. (You set the server name in the Destination address field of the Destination form.)

  • The names of CM sites whose assets can be published to the destination.

For any publishing method, you can configure more than one publishing destination for your Sites system. Depending on how your online sites are designed by the developers, you may need to publish both static content (HTML files, using Export to Disk) and dynamic content (pages generated on the fly by the Mirror to Server or Export to XML publishing method). For this kind of dual implementation, consult with your developers to determine how to configure your publishing destinations.

In this document, the following terms are used when discussing publishing destinations and configuration:

  • Source. The WebCenter Sites database that serves as the source for a publishing session. Because you can mirror assets from any Sites system to any other Sites system, the source is not always the content management system.

  • Destination. Either the WebCenter Sites database that you are mirroring to or the directory that you are exporting to.

For information about creating publishing destinations, see Section 15.4.3, "Configure an Export Destination" and Section 16.3.5, "Create a Mirror Destination."

12.4 The Approval System

When assets are approved for publication on a specific destination, WebCenter Sites verifies that each asset is ready to be published by invoking the approval system. The approval system runs a pre-publication process that protects the online site against the possibility of broken links and outdated content. In this process, the approval system determines answers to the following questions:

  1. Which assets are deemed to be ready for publishing — that is, which assets are marked by the user as approved?

  2. Do the approved assets have dependencies? That is, must any other assets also accompany those approved assets? or, must any other assets also exist on the destination to ensure that all the links on the site will work correctly?

    For example, you may have a site set up that has article assets that refer to image files. An approved article with an unapproved associated image file cannot be published until the image file is also approved.

Depending on the answers to these questions, the approval system either allows the publishing system to publish approved assets at the next publishing session, or it stalls the publication of assets that fail the dependency test.

Note:

In Export to Disk publishing, the choice of templates can cause assets to bypass the approval system. For more information about the approval system in Export to Disk publishing, see Chapter 14, "Various Topics in Export to Disk Publishing and the Approval Process."

It is typical to build an approval step into your workflow processes. For information about workflow, see Chapter 10, "Creating and Managing Workflow Processes."

For information about how to approve assets, see the Oracle Fusion Middleware WebCenter Sites Developer's Guide.

Detailed information about the workings of the approval system is given in Chapter 13, "The Approval System" and Chapter 14, "Various Topics in Export to Disk Publishing and the Approval Process."

12.5 The Publishing Schedule

A publishing session (no matter what the publishing method) runs as a background, batch process called a publish event. As the administrator, you configure the schedule for publishing events.

You can schedule publishing events to occur daily, weekly, hourly, every 15 minutes, or in various combinations of these time increments. When scheduling multiple publishing sessions, bear in mind several rules:

  • Publishing to a given destination must be done serially.

    Because each publishing session is a background event, a given destination can support only a single publishing session at a time. If publishing to a specific destination is still in progress when the next event for that destination is scheduled, the second event attempts to run and then fails, reporting that a publishing session to that destination is already underway.

    Similarly, multiple sources must not be configured to publish simultaneously to the same destination. Doing so will cause publishing errors and problems with data integrity.

  • Never schedule a publishing session to a destination for a time when the destination system could be publishing to another destination.

    For example, you publish from the development system to the management system, and from the management system to the delivery system. Do not schedule a publishing session from the development system to the management system while the management system is publishing to the delivery system.

  • Publishing to multiple destinations can be done simultaneously. You can publish to multiple destinations at the same time by setting up events for the destinations and selecting the same time for them.

Because a publishing event completes database transactions, the publishing feature must have a user account specified for it. This user is called the batch user and you use the xcelerate.batchuser and xcelerate.batchpass properties in the futuretense_xcel.ini file to identify the batch user account for your Sites system.

Note:

Publishing also requires a mirror user, different from the batch user. For more information, see Section 16.2.1, "Users and Mirror to Server Publishing".

12.6 What Happens During a Publishing Session?

When the publishing system begins publishing approved assets, WebCenter Sites does the following:

  • Creates a publishing session by adding a row to the PubSession table and assigns the session a unique ID, called the PubSession ID.

  • Runs a query to gather all the assets that are approved and are ready to be published to the destination that the session is publishing to.

  • Locks the assets that are returned by the query, and also notifies the CacheManager about these assets, so that they cannot be edited while the publishing session is underway.

  • Invokes the appropriate element for the publishing method, passing it the list of assets that should be published.

Then, those assets are either rendered into files or mirrored to a destination database, depending on the publishing method in use. For information about what the Export to Disk, Mirror to Server, and Export Assets to XML publishing methods do with the list of approved assets, see the following chapters:

When the publishing session concludes, the publishing system notifies the approval system of which assets were published and then it updates the page cache.

12.7 Obtaining Information About a Publishing Session

WebCenter Sites writes information about each publishing session to log files and to several tables in the WebCenter Sites database. Much of this information is displayed in the Publishing Console as the publishing history for a session. To display the Publishing Console, click the Publish button located in the top button bar in the main window. See also Section 18.16, "Troubleshooting."

Note:

You must have the xcelpublish ACL to view the Publish Console.