Oracle Application Server InterConnect Adapter Publishing Engine User's Guide 10g (9.0.4) Part Number B10421-01 |
|
This chapter provides an introduction to the Oracle Application Server InterConnect Adapter Publishing Engine. The following topics are discussed:
The Publishing Engine provides an event publication mechanism for systems that have no native publication mechanism (for example, PeopleSoft). The Publishing Engine tracks changes to the applications by periodically polling for changes to data from operator input. It essentially polls the application looking for predefined variables.
The Publishing Engine consists of three major components:
The events defined through the Publishing Manager appears in the component browser. You can browse and define published events in iStudio.
Table 1-1 lists the platforms on which the Publishing Engine runs.
Operating System | Version |
---|---|
Windows NT |
Version 4.0 with Service Pack 6 or above |
Windows 2000 |
With Service Pack 1 or above |
HP-UX |
11.0 and 11.11 |
Sun SPARC Solaris |
8 and 9 |
To convert inbound polling calls into outbound published events, the Publishing Engine must be able to retrieve unpublished data. This is done by tracking (in persistent storage) the key fields of previously retrieved data. When the polling interval begins, the agent retrieves all data added/ changed/ deleted after the last stored key fields. After retrieving new data, the Publishing Engine publishes the data as an event and updates the stored key field. However, if no new data is retrieved, no event is generated. This cycle begins again during the next polling interval.
This process of storing and tracking key field values to retrieve only the data changed since the last polling interval is called Key Management. There are two main forms of key management recognized by the Publishing Engine:
Internal key management is where functionality, within the system itself, tracks the changes. With internal key management, the Publishing Engine does not need to store or manage keys itself. Instead, a business API is provided in the system that provides the user with all the new records since the last time this API was called. When the Publishing Engine polls this API, it may or may not retrieve records in the output set. If it retrieves records, it publishes them as a single event. Otherwise, it waits for the next polling interval.
To use internal key management with the Publishing Engine, the business API must either have no input parameters or one fixed- value input parameter. All other parameters must be output parameters (or input/output
parameters for which the input can be empty). A fixed value input parameter is provided if the API supports multiple different callers. Each caller has a different value and the API stores caller-specific data previously retrieved.
The following is an example of an API that the Publishing Engine can support for internal key management:
void GetUpdatedVendors (in String callerName,
out VendorList updatedVendors);
There is one disadvantage to use internal key management: unless the system being called supports transactional calls, the Publishing Engine can only guarantee zero- or one-time publishing of events (it cannot guarantee exactly-one time publishing of events). The API call may succeed in the system itself (and the API updates and commits its internal key storage) but if, as the data is being transmitted back to the Publishing Engine, a network (or other) failure occurs, then the Publishing Engine will not receive the data and, therefore, cannot publish it. In order to provide exactly-one time event publishing external key management must be used.
External key management is similar to internal key management except that the Publishing Engine manages the persistent storage of the published key values. With external key management, the business APIs used by the Publishing Engine essentially retrieves all records whose key is greater than a given input key value. The Publishing Engine stores these key values, therefore, it can provide exactly one time event publishing in concert with the event queuing mechanism.
To use external key management with the Publishing Engine, the business API must have one input parameter used to pass in the last known key value. This parameter can also be an input/output (the output is ignored unless the output value is the updated, most recent key value). All other parameters must be output parameters (or input/output parameters for which the input can be empty).
In addition, the API provides two ways to retrieve the most recent key value:
The following is an example of an API that the Event Editor can support for external key management:
void GetVendors (in String lastKnownKey,
out String mostrecentKey
out VendorList vendorsInAnyOrder);
In these cases, the Publishing Engine persistently stores and tracks the last known key value and passes the most recent value into the API each time the API is called. The Publishing Engine stores the key values (as well as the event definitions) on a per-profile basis.
To use publishing engine with Oracle Application Server InterConnect, you need to:
pubmgr
tool.
pubmgr
and trigger the event. However, if the events are not manually triggered, the events will be triggered as soon as you start the application.
The Publishing Agent polls the system for the changes in data and reports the changes back to the Oracle Application Server InterConnect application.
An event must be defined in the Publishing Manager to indicate its purpose. Use the following steps to define an event:
Installation directory\bin
directory.
pubmgr
iStudio and press Enter.
add
to add a new event definition. For example:
add Vendors Deleted
This creates a Vendors category if it does not already exist and adds the Deleted event definition to that category.
Execute@PeopleSoft://Queries/DELD_VENDORS
To find which URL to use, please refer to the iStudio section of your Adapter document. Follow the step up to the point where the Define Application View is populated. In the field for Object Name at the top of the screen, the URL will be displayed.
After you have defined the polled events for Publishing Engine, create the corresponding published events using iStudio.
The publishing agent is responsible for the runtime polling and event publishing. It is started as part of the Oracle Application Server InterConnect application startup. Use the following steps to start this application:
pubmgr
and trigger the event. However, if the events are not manually triggered, the events will be triggered as soon as you start the application.
The Publishing Agent polls the system for the changes in data and reports the changes back to the Oracle Application Server InterConnect application.
Use the following steps to use the Publishing Engine on a Unix machine:
export
filename in the pubmgr
on Windows.
import
filename in the pubmgr
.
All commands for running pubmgr
and defining events is the same on Unix as it is on Windows.
Use the Publishing Manager to configure and monitor the Publishing Engine. Use the Publishing Manager to publish an event or message to monitor. The information set in the Publishing Manager is stored in the config\pub.db
file created on activation of the Publishing Manager.
From and command line:
pubmgr [{-p | -r} <script>] [<profile>]
where:
-r
--Records a script containing each of the commands performed interactively during the execution of this session of the publishing manager.
-p
--Plays back a previously recorded script.
Each event, defined with the Publishing Manager, is given a category for organizational purposes. Examples of possible categories are Customers, Vendors, or PurchaseOrders. When using the Publishing Manager, the category must always be specified along with the event name.
Table 1-2 describes each of the commands available within the Publishing Manager.
|
![]() Copyright © 2002, 2003 Oracle Corporation. All Rights Reserved. |
|