Creating and Using Query Feeds

This chapter provides an overview of query feeds and discusses how to:

Click to jump to parent topicUnderstanding Query Feeds

This section discusses query feed security.

Query Feed Security

The Feed Publishing Framework has two levels of security: feed security and data security. Feed security controls who can see the feed when searching for feeds. Data security controls whether the underlying data can be seen in the feed entries when a user requests the feed document.

Query feed security, which feed administrators specify on the advanced options page, determines feed security, that is, who can see the feed in search results.

Click to jump to parent topicPublishing Query Feeds

This section provides an overview of the steps used to publish a query feed and discusses how to publish a query as a feed.

Click to jump to top of pageClick to jump to parent topicUnderstanding the Steps to Publish a Query Feed

To publish a query as a feed:

Note. Any user with access to Query Manager can publish query feeds.

  1. Select Reporting Tools, Query, Query Manager.

  2. Select the query that you want to publish as a feed and click the Edit link.

  3. Click the Publish as Feed link.

    Note. If a feed has already been published for this query, then the link appears as Manage Feeds rather than Publish as Feed.

    See Publishing a Query as a Feed.

  4. On the Publish Feed Definition page, define the feed properties.

    See Defining Feed Properties.

  5. Click the Advanced Options link.

  6. Enter the query parameters, define advanced options such as feed security, and map feed entry elements for the query feed.

    See Defining Advanced Options for Query Feeds.

  7. Click the OK button.

  8. Click the Publish button.

Click to jump to top of pageClick to jump to parent topicPage Used to Publish Query Feeds

Page Name

Definition Name

Navigation

Usage

Fields

QRY_FIELDS

Reporting Tools, Query, Query Manager

Create feed definitions for queries.

Click to jump to top of pageClick to jump to parent topicPublishing a Query as a Feed

Access the Fields page (Reporting Tools, Query, Query Manager).

Use the Fields page to publish a query as a feed. Click the Publish as Feed link to begin creating the feed definition.

Note. If a feed has already been published for this query, then the link appears as Manage Feeds rather than Publish as Feed.

Create the feed definition on the Publish Feed Definition page.

See Defining Feed Properties.

Click to jump to parent topicDefining Advanced Options for Query Feeds

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicPages Used to Define Advanced Options for Query Feeds

Page Name

Definition Name

Navigation

Usage

PSQuery Data Type - Advanced Feed Options

PTPSQRY_ADV_OPT

Click the Advanced Options link on Publish Feed Definition page.

Enter the query parameters, define advanced options such as feed security, and map feed entry elements for the query feed.

Feed Element Mapping Builder

PTPSQRY_MAP_ELMT

Click the Edit button on the Feed Entry Content Mapping grid.

Create entry templates to customize the output of the elements that comprise each feed entry of a query feed.

Click to jump to top of pageClick to jump to parent topicEntering Advanced Feed Options for Query Feeds

Access the Advanced Feed Options page (click the Advanced Options link on the Publish Feed Definition page).

Query Prompts

Any fields that contain prompts appear in this area. Enter the prompt values that the query should return before you publish the feed. If you do not enter necessary prompt values, then the published feed contains no entries.

Advanced Query Feed Options

Max Number of Entries

Enter the maximum number of entries that the feed should return to the user. Enter 0 for unlimited entries up to the maximum row limit specified on the Feed Options page, which is 300 by default.

Note. You can configure the upper limit on the Feed Options page.

Preview Feed

Click to save and temporarily publish and view the feed.

Entry Occurrence

Select from these options:

All Rows in One Feed Entry: Select this option to have the feed reader display one entry for the entire query.

One Row Per Feed Entry: Select this option to have the feed reader display one entry for each row returned by the query.

Feed Publishing Type

Select from these options:

Scheduled: Select this option to use Query Scheduler to schedule the query to run once and be stored in the Integration Broker queues. This option provides superior performance, but it should be used when the data changes infrequently. If you select this option, you may select whether to publish the feed in the language of the current user or all available languages.

See Scheduling Queries.

Real Time: Select this option to run the query in real-time each time a user requests that this query feed be updated in the feed reader. If you select this option, you can only publish in the language of the user configuring the feed.

Publish Language

Active only when Feed Publishing Type is set to Scheduled, this field determines the languages in which the system publishes the query feed. Select from these options:

Current Language Only: Select to publish the query feed in the language of the content owner.

All Available Languages: Select to publish the query feed in all translated languages in your database.

Query Feed Security

Select from these options:

Public Feed: Select to make the query feed available to all users. This option is available with all Feed Publishing types.

Note. The user context for processing the query is the default user on the ANONYMOUS node.

Query Security: Select to use Query security as the basis for the feed-level security. This option is available only with the Real Time Feed Publishing type.

When you define this type of query feed security, only the users who have rights to modify the query in Query Manager can find and view the query feed.

DistributionList/QuerySecurity: Select to use the Query distribution list in Report Manager as the basis for feed-level security. This option is available only with the Scheduled Feed Publishing type.

When you define this type of query feed security, only the users that are on the distribution list when the query feed is scheduled to run from the Schedule Query Request dialog box can find and view the feed.

See Feed Security Options.

Query Fields

This grid displays the fields that are available to the query as defined in the query definition in Query Manager. The grid is display-only.

Feed Entry Content Mapping

The fields in the Feed Entry Content Mapping grid on the Advanced Feed Options page enable you to create a template for the query data that is used to generate each feed entry. You select feed entry elements and either use the given template or build one of your own using the Feed Element Mapping Builder. This information, when published, determines how each entry appears to the user.

See Mapping Feed Entry Elements to Entry Templates.

Click to jump to top of pageClick to jump to parent topicMapping Feed Entry Elements to Entry Templates

The Feed Entry Content Mapping grid appears at the bottom of the PSQuery Data Type - Advanced Feed Options page.

Feed Entry Content Mapping grid

You can use one of three methods to edit entry templates for feed entries:

Important! Unless you are aware of the proper encodings to use, you should use the Mapping Builder to edit or create entry templates.

See Using Mapping Builder to Edit Entry Templates.

The Feed Entry Content Mapping grid has these fields:

Comment

Click to display more information about this feed entry element in a modal window.

Feed Entry Element

Each feed entry element is a property of an entry that can be interpreted and displayed by a feed reader.

Note. Not all feed readers display all elements. Consult the documentation for your feed reader.

Entry Template

A template is a string that encloses bind variables inside % symbols. When the feed is published, the string as XML passes to the feed reader, which displays the content from the PSQuery data source according to the template instructions.

Entry templates support these bind variable types:

  • System variable, for example, %Copyright%.

  • Template variable, for example, %ROW.HTML%.

  • Query columns, for example, %ALIASNAME.QUERYCOLUMNNAME%.

  • Message Catalog text, for example, %MSGT:10.10%.

  • Message Catalog explanation, for example, %MSGE:10.10%.

Display Entry Element in Modal Window

  • On the grid itself, click to display the entire grid in a separate modal window.

  • To the right of an entry template, click to display and edit the text of the entry template in a separate modal window.

Edit

Click to access the Feed Element Mapping Builder page to use the Mapping Builder to modify the entry template.

See Using Mapping Builder to Edit Entry Templates.

This table describes the values that you can select for the Feed Entry Element field:

Feed Entry Element Field

Description

Action of Feed Reader

Entry Template Values

Runtime Processing

Entry Title

This element is a brief, single-line explanation of the feed entry.

Only one entry title can exist per entry.

The reader displays the title as indicated by the template.

Any template containing any bind variable.

Can have HTML tags but must be only one line.

The system escapes the HTML as well as XML characters.

Entry Content URL

This element is the URL to the PeopleSoft application page or other content.

Only one entry content URL can exist per entry.

The reader displays an active link to enable the user to navigate to this URL.

Can map this to a field containing a URL, a computed field, or a static URL which has query columns as parameters

The system escapes no characters. Make sure that the URL is valid and confirm that you can use it as an attribute.

Entry Categories

This element defines the category of an entry.

Multiple entries can belong to the same category, and one entry can belong to multiple categories.

The reader organizes and filters entries based on values.

Any template containing any bind variable, but user should consider short values for ease of organization.

The system escapes the HTML as well as XML characters.

Entry ID

This element is a permanent, universal identifier.

Only one ID can exist per entry.

The reader detects changes to an existing entry and presents modifications of the existing entry instead of creating a new entry, while ignoring unchanged entries.

Any template containing any bind variable.

The system escapes the HTML as well as XML characters.

Entry Updated

This element is the date and time that the entry was most recently modified.

Only one update date can exist per entry.

The reader uses this entry to determine, in conjunction with the ID, whether to update the data in the entry.

Static value in PeopleTools date and time format.

Dynamic value present in any date time query column.

System variable %DateTime.

Values that are PeopleTools date time formatted will be converted to atom specific date time format.

Entry Published

This element is the date and time when the entry was originally created.

Only one publish date can exist per entry.

The reader uses this entry to determine the maximum age of the data.

Static value in PeopleTools date and time format.

Dynamic value present in any date time query column.

System variable %DateTime.

Values that are PeopleTools date time formatted will be converted to atom specific date time format.

Entry Author

This element pertains to information about the creator, owner, and author of this entry.

Only one author can exist per entry.

The reader organizes and filters entries based on the value of this field.

The reader can use this field to send email to the author.

Static values in this format:

Name[Email⇒ Address]

Author name and email ID can be mapped to query columns or system variables.

The system extracts the email address extracts from [] and the name from the value before the brackets.

Note. The brackets may be left empty, but they must be present for the system to correctly process this entry.

The system escapes the HTML as well as XML characters.

Entry Contributors

This element pertains to information about various parties involved in this entry.

Multiple contributors can exist per entry.

The reader organizes and filters entries based on the value of this field.

The reader can use this field to send email to the author.

Static values in this format:

Name[Email⇒ Address]

Contributor name and email ID can be mapped to query columns or system variables.

The system extracts the email address extracts from [] and the name from the value before the brackets.

Note. The brackets may be left empty, but they must be present for the system to correctly process this entry.

The system escapes the HTML as well as XML characters.

Entry Description

This element is a brief description about the entry, which can be more detailed information than a title but less information compared to full content.

The reader presents more information than the title but less than the full content, while providing a link to the full content.

Any template containing any bind variable.

HTML tags.

The system escapes the HTML as well as XML characters.

Entry Enclosures

This element contains other content types accessible using a URL, for example images and mp3 files.

Multiple enclosures signifying multiple attachments can exist per entry.

The reader can automatically download content and display it in place or enable the viewer to access it by using external tools based on the content type.

URL to the resource, its content, and its length in bytes.

Use this format: ""href="URL" type="content/type" length="byte-size"". The system extracts the values inside the quotes. You can leave empty quotes in case the value needs to be ignored. You can map the href, type, and length values that are within the quotes to any bind variable, but the template output should be a valid URL/Content-type/length.

The system escapes the HTML as well as XML characters.

Entry Full Content

This element is the body of the entry.

Only one full content can exist per entry.

The reader can display the content of the entry by default or upon user request.

Any template containing any bind variable.

HTML tags.

The system escapes the HTML as well as XML characters.

Expires

This element is the date time when this entry is invalid and should be considered outdated.

Only one expiration date time can exist per entry.

The reader determines when to discard this entry.

Static value in PeopleTools date and time format.

Dynamic value present in any date time query column.

Values that are PeopleTools date time formatted will be converted to atom specific date time format.

The system escapes the HTML as well as XML characters.

Max Age

This element is the length of time in milliseconds until the entry will be valid after the Published or Updated date and time.

Only one maximum age can exist per entry.

The reader determines when to discard this entry.

Static number or mapped to a query column, which results in number.

The system escapes the HTML as well as XML characters.

Entry Copyright

This element contains the copyright information.

Only one copyright can exist per entry.

The reader displays the copyright information upon request.

Any template containing any bind variable. The %Copyright% system variable can be used to map to the system-level copyright information.

The system escapes the HTML as well as XML characters.

Click to jump to top of pageClick to jump to parent topicUsing Mapping Builder to Edit Entry Templates

Access the Feed Element Mapping Builder page (click the Edit button next to an entry template in the Feed Entry Content Mapping grid).

You edit entry templates using Mapping Builder, which enables you to create custom output for feed entries using your own entry templates. You do this by assembling various combinations of static text and variable elements, or by writing directly in the rich text editor.

Note. Currently, sharing templates among feed administrators is not supported. However, you can use the Download icon to export the grid values so that they can be used with other query feeds.

Assembling Entry Template Elements

You can edit these feed entry elements by assembling combinations of element types:

To assemble template elements into an entry template:

  1. On the Advanced Options page, click the Edit button associated with the entry template you want to edit.

  2. In the Mapping Builder grid, select the Type of element to add to the entry template.

  3. Click the + button to add another element.

  4. Continue adding rows and constructing the entry template.

  5. Click the Preview button.

  6. Click the OK button.

This example shows an assembled entry template:

The Mapping Builder fields are described as follows.

Type

Select from these Mapping Builder types to assemble the entry template:

Message Catalog Explanation

Message Catalog Text

Query Fields

Static Text

System Variables

Templates

Message

This field is visible when the Type field value is Message Catalog Explanation and Message Catalog Text.

Enter the message number to appear in the entry.

Note. Use the Message Catalog rather than static text to generate a template that is language independent.

Msg Set (message set)

Visible when the Type field value is Message Catalog Explanation and Message Catalog Text.

Enter the message set number to appear in the entry.

Note. Use the Message Catalog rather than static text to generate a template that is language independent.

Text

This field is visible when the Type field value is Static Text.

Enter the text that you want to appear in the entry.

Note. To have a percent sign appear in the text of the template, it needs to escaped using %%. For example, if the template reads %%, then at runtime the builder replaces it with %.

Value

This field is visible when the Type field value is System Variables.

Select from any of the available system variables.

See System Variables.

Variable

This field is visible when the Type field value is Templates or Query Fields.

When the Type field value is Templates, select from these Template options:

  • Row in HTML Format

  • Row in TEXT Format

When the Type field value is Query Fields, select from any field comprising the query definition.

Creating Entry Templates in the Rich Text Editor

These feed entry elements present the rich text editor, where you can enter HTML, rich text, and bind variables to create a variety of output types to the feed reader:

This example shows an entry template built by using the rich text editor:

Accessing Bind Variables in the Rich Text Editor

You can access these types of bind variables in the rich text editor:

Click the Insert Bind Variable button or right-click and select Insert Bind Variable to access the InsertBindVariable dialog box:

Click to jump to parent topicUsing Query Feeds

You can view query feeds by selecting either of the following navigation paths: