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 feeds.

Query Feed Data Types

PeopleSoft delivers the Query feed data type, which uses the application class created for query feeds.

Access the Define Feed Data Types page (select PeopleTools, Feeds, Define Data Types, PS Query (PTFP_DATATYPE).

Query Feed Security

There are two levels of security in core Feed Publishing Framework, feed security and data security. Feed security controls who can see the feed when searching it. Data security controls whether the underlying data can be seen in the feed entry when user request it at runtime.

Query feed security, which users can specify in advance options page in feed designer, is for defining feed security.

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 and manage query feed definitions.

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

Any user with access to Query Manager will be able to publish query feeds.

Complete these steps to publish a query feed definition:

  1. Select Reporting Tools, Query, Query Manager.

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

  3. Click the Publish as Feed link.

  4. Enter a feed title and description.

    See Publishing and Managing Query Feed Definitions.

  5. Enter overrides for Additional Feed Properties and Contributors.

  6. Click the Advanced Options link.

    See Defining Advanced Feed Options for Query Feeds.

  7. Enter the query parameters and values for the feed.

  8. Click OK.

  9. Click Publish.

Click to jump to top of pageClick to jump to parent topicPublishing and Managing Query Feed Definitions

Access Query Manager (Reporting Tools, Query, Query Manager).

  1. Select the query to publish.

  2. Click the Publish as Feed link.

    The Publish Feed Definition page appears.

  3. Click the Advanced Options link to map query data.

    The Advanced Feed Options page appears.

    See Defining Advanced Feed Options for Query Feeds.

  4. Set advanced options and change the feed entry content mapping values, if necessary.

    See Mapping Feed Entry Elements to Entry Templates.

  5. Click the OK button.

  6. Enter values in the Additional Feed Properties group box to override default properties.

  7. Select the appropriate security option.

  8. Click the Publish button.

Managing Query Feeds

Access Query Manager (Reporting Tools, Query, Query Manager).

To edit query feeds:

  1. Select Reporting Tools, Query, Query Manager.

  2. Select the query to publish.

  3. Click the Manage Feeds link.

    The Publish as Feed page appears.

  4. Click the Edit button.

    The Publish Feed Definition page appears.

  5. Click the Advanced Options link to edit advanced options.

    The Advanced Feed Options page appears.

    See Defining Advanced Feed Options for Query Feeds.

  6. Edit advanced options and change the feed entry content mapping values if necessary.

    See Mapping Feed Entry Elements to Entry Templates.

  7. Click the OK button.

  8. Enter values in the Additional Feed Properties group box to override default properties.

  9. Select the appropriate security option.

  10. Click the Publish button.

Click to jump to parent topicDefining Advanced Feed Options for Query Feeds

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicUsing the Advance Feed Options Page for Query Feeds

Access the Advanced Feed Options page (select Reporting Tools, Query Manager and click the Publish as Feeds link). On the Publish Feed Definition page, click the Advanced Options link.

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 feeds entries to display in the feed reader. Enter 0 to return an unlimited number of rows.

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 IB 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 passes to the feed reader. 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.

Note. Click the Zoom icon to work with the Feed Entry Content Mapping grid in its own modal window or to work with each template entry in its own modal window.

See Using Mapping Builder to Edit 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 has these fields:

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 on your feed reader.

Entry Template

A template is a string that encloses bind variables inside % symbols. When a 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.

Note. Click the Zoom icon to work with each entry in its own modal window.

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%.

Feed Entry Content Mapping

The Feed Entry Content Mapping grid has these fields:

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 on 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.

Note. Click the Zoom icon to work with each entry in its own modal window.

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%.

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

Feed Entry Element

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 needs to 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 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 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 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 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 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 of the about the entry, this can have more detailed information than a title and 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 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 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 when the entry will be valid after the Published or Updated date 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

Entry templates can be edited using Mapping Builder, which enables you to create custom output to the feed reader by building 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 users is not supported. However, you can use the Export to Excel icon to export the grid values and share the values among users and with other query feeds.

To access Mapping Builder, click the Edit icon associated with the entry element that you want to change.

Click the Edit icon to access Mapping Builder.

Click the Zoom icon to work with an entry in its own modal window.

Assembling Entry Template Elements

These feed entry elements can be edited by assembling combinations of element types:

To create 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 two 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

Query feeds are secured by user IDs. The query user must have access to the service operation PTFP_FEED. This access is included in permission list PTPT1000, which is in the role PeopleSoft User. When a user is signed on to PeopleSoft Pure Internet Architecture, the user can view the feeds by selecting either of the following navigation paths:

Click to jump to parent topicManaging Query Feeds

Access the Publish as Feed (PTFP_PUB_AS_FEED) page (click the Publish as Feed link from Query Manager pages).

All of the published query feed definitions for the selected query appear. From this page, you can edit, delete, or add query feeds.

Edit

Use this button to open the Publish Feed Definition page, where you can edit the current published definition.

Delete

Use this button to delete the query feed.

Add Feed

Use this button to define and publish a new query feed.