Mashing Oracle: Part 2 Mashing PeopleSoft
Posted 02/17/2010 - 17:00 by danmalks
A Developer's Guide to 'Mashing Oracle' Applications
Part 1: Mashing Oracle Siebel
Part 2: Mashing Oracle PeopleSoft
Part 3: Mashing Oracle E-Business Suite
The complete 'Developer's Guide to Mashing Oracle' includes best-practices for building mashups using Oracle applications. This is a three part series. Part 1 focuses on mashing Oracle Siebel. Part 2 focuses on mashing Oracle PeopleSoft and Part 3 will be released in the coming weeks
1.1 Overview/Architecture
Presto platform allows you to mashups data from multiple sources of information, i.e, combine data from various source in an uniform way, massage and manipulate data to produce and generate meaningful and relevant data sets. The resulting mashups can be visualized as mashups, embeddable UI widgets, and can be published to almost any application including Portals, enterprise web applications, online Web 2.0 portals like iGoogle, NetVibes, etc. PeopleSoft applications can be used as a mashable data source to mashup with any other mashables, including other PeopleSoft data. PeopleSoft component web services provide an easy to integrate into the Presto platform. The picture below highlights the various architectural pieces and interaction between PeopleSoft Webservices, Presto Mashup server and Portals/Web Apps.

1.2 Exposing PeopleSoft Component WebServices
Any Component in PeopleSoft can be quickly and easily exposed as a Web Service. A PeopleSoft Web Service exposes the same data and business logic as its on-line UI-based counter part. This exposure is accomplished by creating a Component Interface (CI) to an existing PeopleSoft Component.
The creation of the Web Service definition (CI) is done in the PeopleTools Application Designer. Security to the Web Service is granted via the PeopleSoft Internet Architecture (PIA) based security pages. Not only is the CI available at runtime but PeopleSoft also exposes the design-time counter part (WSDL) for the CI via PIA.

1.3 Consuming PeopleSoft WebServices in Presto
Presto Service Explorer can be used to register a wide variety of data services including WSDL services. To register a PeopleSoft service in Presto, you must first generate the WSDL using the PeopleSoft web services provider wizard. The generated WSDL can be registered in Presto using the WSDL service registration wizard. After registration and activation, the PeopleSoft web service is ready for consumption.

1.4 Creating Mashups
Mashups of PeopleSoft data can be created using Presto Wires (visual mashup composition tool) or Enterprise Masuhp Markup Language (EMML), a standards based mashup language. Presto Wires allows both business users and developers to create mashups in a simple, graphical way. The features and scope for Wires mashups, however, is only part of the full capabilities and flexibility possible with mashups. Developers who need more robust mashup capabilities can create mashups using the Enterprise Mashup Markup Language (EMML). This XML vocabulary is a very simple, but very powerful way to quickly build mashups from Presto services or any service accessible by URL.

1.4.1 Using Wires
Wires allows you to mashup PeopleSoft data with other data services including other PeopleSoft services. Response from any WSDL operation can be mashed-up with other data. Mashup supports actions such as join, merge, filter, sort, etc., to manipulate and control the mashups results. Custom actions can also be created for general purpose or specific actions using EMML macros.
The services, mashups and actions listed on the top left side can be dropped on the main canvas to build mashups. Bottom left area can be used to set mashup/service input parameters, filter conditions, action settings, etc. The bottom right side displays real-time results of the mashups which can be visualized in various ways including data grid, chart, RSS feeds and XML. You can view results of any node of mashup by executing that specific node.
Newly created mashups can be published and activated from within wires. You can also invoke "Mashlet Maker" directly from within wires to publish a mashlet, an embeddable UI widget, for mashup visualization.
1.4.2 Using EMML
EMML mashups can be created using the Presto Mashup Studio for Eclipse. Mashup Studio can organize mashups in projects, includes several levels of assistance to help with syntax both for EMML and for XPath, for provides robust, familiar debugging features, etc. Presto platform also includes utility scripts for running and publishing mashups from the command-line.
The mashup belows shows a simple invocation of Account web service using the find operation to get accounts information.


1.5 Custom Macros for PeopleSoft
Macros are basically snippets of mashup logic that can accept input parameters and produce output. They can do anything that you can do in a mashup, except call another macro. Macros allows for building modular functions and promotes reuse of business logic across mashups. The macro sample below geo-codes any data containing POSTAL CODE with latitude and longitude values.

Once this macro is configured for use, any mashup can invoke it to annotate geo-codes to appropriate datasets. For example, the PeopleSoftCustomers.find mashup can be easily extended to include geo-codes by calling the above macro. The invocation of the macro to do so is simple function call like shown below.

The output of this mashup will be all the data returned by the PeopleSoft service and 2 additional columns for Latitude and Longitude for each customer with a valid postal code.
1.5.1 Virtualizing Complex WebServices
WebService inputs are typically complex and PeopleSoft web services are not different. The PeopleSoftAccountQueryByExample is fairly complex and will be quite unpleasant for users to interact directly. The EMML sample above shows how complex web services can be virtualized to accept simple, primitive type input parameters. The sample above uses in the input strings passed to build to required complex input for the web services. This virtualization allows ends users to easily interact with such services by abstracting the underlying complexity.
1.6 Building Mashlets
Mashlets are embeddable UI components/widgets attached to one or more mashups. It visualizes the mashups result in a format appropriate for the data returned by the mashup. Presto provides different ways to build mashlets, wires, mashlet maker, presto portal connector, etc. It's typically trivial compelling grids, charts, maps, etc view using the various tools. Mashlets requiring custom functionality can be build by writing a custom one.
The mashlet on the right shows a web 2.0 grid visualization of the customer accounts data. Such a mashlet can be displayed in web applications, mobile phones, in standard portals as JSR-168/WSRP portlet.
Using the customer accounts mashup annotated with geo codes, it is very easy to visualize the results on a map using the out-of-the-box map views. The mashlet on the right displays the customers list as markers on map which can be clicked to display customer details.
The sample code below is generic map mashlet and supports event wiring. When this mashlets to wired to another PeopleSoft customer acccounts mashlet , any row clicks on accounts can be processed and displayed on the map.

// Sample Google Map Mashlet // Handles event with geo code payload and renders // the location on map. Ema.namespace("Google"); Google.Map = Class.create(Ema.BoxMashlet, { coords: [], map: '', bounds: '', render: function(){ google.load("maps", "2", { "callback": this.renderMap.bind(this) } ); }, renderMap: function() { var g = google.maps; this.coords = [{Latitude: '37.5341', Longitude : '-122.2478'}]; if (g.BrowserIsCompatible()) { this.map = new g.Map2(this.bodyEl); this.bounds = new g.LatLngBounds(); this.map.addControl(new g.SmallMapControl()); var bottomRight = new g.ControlPosition(G_ANCHOR_BOTTOM_RIGHT, new g.Size(10,10)); this.map.addControl(new g.MapTypeControl(), bottomRight); this.coords.each(function(coord) { this.drawMarker(coord.Latitude, coord.Longitude); }, this); this.map.setZoom(5); } }, drawMarker: function(lat, long, label) { var g = google.maps; var loc = new g.LatLng(lat, long); this.bounds.extend(loc); this.map.setCenter(this.bounds.getCenter()); var marker = new g.Marker(loc, {draggble:false}); this.map.addOverlay(marker); this.map.setZoom(this.map.getBoundsZoomLevel(this.bounds)); if (label && label !== "") { g.Event.addListener(marker, "click", function() { marker.openInfoWindowHtml(label); }); } }, onRowClick: function(args) { if (args[0] && args[0].Latitude && args[0].Longitude) { var label = ""; var keys = Object.keys(args[0]).without("Latitude").without("Longitude"); keys.each(function(key){ label += Object.isString(args[0][key]) ? (args[0][key] + "<br>") : ""; }, this); this.drawMarker(args[0].Latitude, args[0].Longitude, label); } }, onRefresh: function() { this.render(); } });
VP App Platform Eng, JackBe dan@jackbe.com
- danmalks's blog
- Login or register to post comments
- Email this page










