Feed Publishing Framework - An effective way to publish contents

 Feed Publishing Framework

Introduction to the Feed

    According to the latest (Wiki), a web feed (or news feed) is a data format used for providing users with frequently updated content. Content distributors syndicate a web feed, thereby allowing users to subscribe a channel to it by adding the feed resource address to a news aggregator client (also called a feed reader or a news reader).

    This helps user to know changing content without needing to go some other site or do anything.

PeopleSoft's Feed Publishing Framework

It's one of the module in Oracle PeopleTools. This can provide, 
  • Unified Interfaces for Content Owners - Create, Configure and maintain various types
  • Interfaces for End-Users - Discover feed definitions and related feeds
  • API's for Application Developers - Creating new types and integration with existing features
  • Multi-Language Support - Translation etc.,
    Atom and Really Simple Syndication (RSS) are the two primary syndication formats. Atom also provides a standardized way to export an entire blog, or parts of it, for backup or for importing into other blogging systems.

    PeopleTools delivers predefined feed data types for query feeds, worklist feeds, Integration Broker generic message feeds, and lists of published feeds.

How to Implement your own Feeds?

    As indicated earlier, PeopleSoft offers methods for any application developer/content owners to create their own Feed Type, Definitions and also provide options to publish feeds from PIA.

Prerequisites:

    Since Feed Publishing Framework works on top of the PeopleTools features, you needs to have something setup before actually dive into feed setup or creation. I'll try to give summarized version of that details you need to setup,
  1. IB Gateway and Target Nodes
  2. IB Service setup and Target Locations
  3. Default User on the ANONYMOUS node
  4. Default Local Node with content and portal URI's
  5. Oracle WebLogic Server to disable self-authentication
  6. User Permissions to access the Feeds (PTPT1000 minimum)
  7. Pub/Sub Servers on Application Server
  8. Process Scheduler

Delivered Feed Data Types:

  1. FEED - List of Feeds
  2. GENERICFEED - IB Generic Message Feeds
  3. PSQUERY - PeopleSoft Query Feeds
  4. WORKLIST - Worklist Feeds

Feed Types and Options:

  • Real-time Feeds - Uses synchronous messages
  • Scheduled Feeds - Uses asynchronous messages
  • Paged Feeds - Version of Scheduled feeds that uses IB's Message Segments
  • Incremental Feeds - User uses Timestamps to get the updated feed content 

Feed Security:

    Depending on how the feeds are published (Feed Publishing Wizard or Publish as Feed) security will differ from Permission List - PTPT1300 and setting for every feed. Similarly for viewing feeds you can setup security at Feed-level or Data-level.
  • Feed-Level: 
    • Public: User configured at ANONYMOUS node
    • Realtime: Your Data Source will define the security during feed search
    • Permission List and Roles: Based on users access
  • Data-Level:
    • Application class defines the security of the feed at run-time.

Feed Publication:

  1. Feed Publishing Wizard 
    • Four step guides process takes you through capturing feed data to publishing the same.
  2. Publish as Feed
    • Depending on the Data Type the PeopleSoft system provides access point and mechanism for publishing feeds.

Create Feed Data Source Application Class:

    To create the application class by extending the PTFP_FEED:DataSource:DataSource application class and implementing the required methods (abstract one's).
I have provided my version of Application Class in the GitHub folder for you to download and use it.

Application Class for Data Source

Create the Feed Data Type Definition:

    This is where you define the feed's basic information like Name, Description, Owner ID and it's default properties like Copyright, Logo, Icon, Author Name, Author Email, Contributor Name and Email, application class mapping and the Service Operation which you would use to send and receive feeds.

Feed Data Type Definition

Optionally setup Property Maintenance Component

This allows you to provide users a way to update the properties of a feed without needing to go back to Feed Publishing Wizard as administrator.

Add the necessary 4 delivered pages to your component, and then add the code on “Publish as Feed” component record field.
  1. Publish Feed Definition (PTFP_PUB_AS_FEED)
  2. Advanced Feed Options (PTFP_PUB_AS_ADVOPT)
  3. Publish as Feed (PTFP_PUB_AS_LIST)
  4. Publish Feed Definition to Sites (PTFP_PUB_AS_SITES)

Code on "Publish as Feed" on Maintenance Component

Setting View Content on Component or Pagelet Changes

    Here what you typically do is you setup the placeholders for the feeds, so that end users will be able to discover the published feeds.

    To add it on the component you just have to add the HTML Area (e.g., DERIVED_PTFP.PTFP_HTMLAREA) on the page and add the following code on Page Activate event to set the values for HTML Area.

import PTFP_FEED:FeedFactory;
import PTFP_FEED:UTILITY:HoverMenu;
import PTFP_FEED:UTILITY:RelatedFeedsRequest;

Local PTFP_FEED:FeedFactory &PTFP_FEED_FACTORY;
Local PTFP_FEED:UTILITY:RelatedFeedsRequest &request;
Local array of PTFP_FEED:UTILITY:RelatedFeedsRequest &requests;
Local PTFP_FEED:UTILITY:HoverMenu &resultMenu;

&PTFP_FEED_FACTORY = create PTFP_FEED:FeedFactory();

/* Fill in the search criteria */
&requests = CreateArrayRept(&request, 0);
&request = create PTFP_FEED:UTILITY:RelatedFeedsRequest("unique ID");
&request.DataTypeID = "yourDataTypeID";
&request.DataSourceSettings.Push(CreateArray("Data Source Setting Name", "Data Source Setting Value"));
&requests.Push(&request);

try
   /* Generate the menu */
   &resultMenu = &PTFP_FEED_FACTORY.getRelatedFeedsHoverMenu(&requests);
   DERIVED_PTFP.PTFP_HTMLAREA.Value = &resultMenu.getHtml();
catch Exception &e
   WinMessage(&e.ToString(), %MsgStyle_OK); 
end-try;

Add Feed Content and Test it on Component/Pagelet

    Use Publish as Feed component or the custom component created to add the details of your feed and once it is published, depending on the security set users should be able to access the feed content and be able to view it on their Feed Reader application/Plugin.

    In this case I have published my feeds as Public and used Edge's plugin Feedbro to setup feed and from there I'm accessing. I have also tried it with self hosted web application to read the content and display. Both methods were worked well.

Publish As Feed page

 
Add Feed page

    Once you publish you can directly view the XML content by clicking the Feed Description hyperlink. The URL will look something similar to this, 

https://<dns-name>:<port>/PSIGW/HttpListeningConnector/feeds/GetRealTimeFeed?FEED_ID=ADMN_APPLICATION_CHANGES_FEED&S=P&PORTAL_NAME=EMPLOYEE&NODE_NAME=HRMS&To=PSFT_HR

Feedbro and Localhost screens for your reference.

Feeds on Feedbro


Feeds on localhost

    With enough web development you could present the data as you like.

    In this blog I have just scratched the surface of the complete capabilities of Feed Publishing Framework, there are many other options like Feed Templates, Pagination, Segmentation, Feeds as Announcements, News Letters, Pagelet Publishing.

    I hope you would try out these areas and share your experience to the community.

As always, Happy Learning😊

Comments

You might wanna check out my Popular Post

Running Connected Query BIP / XMLP through Peoplecode / AE Process

Localize your PeopleSoft System Date