Reporting data from a WebCenter Site catalog with APEX

Oracle Application Express (Oracle APEX) is a declarative, rapid web application development tool for the Oracle database. It is a fully supported, no cost option available with all editions of the Oracle database. Using only a web browser, you can develop and deploy professional applications that are both fast and secure.

  • APEX can easily leverage the relationnal data model of webCenter Sites
  • The data model of Webcenter Sites is publicly documented (cf FlexfamilyAsset Model)
  • APEX provides out of the box features for exporting report data as excel or PDF format, filtering and highlighting informations.
  • Report Build is very simple: Once the sql statement is done (cf appendices for a sample based on a Catalog of products), a wizzard helps user in adding a new report, targeted for browsers or Mobile devices
Note:
this approach means that the chosen database for Webcenter Sites repository is Oracle .
The last version (4.2) of APEX has been used for the demo.
Below is a sample Sql Statement which extracts data from the underlying tables of webcenter Sites. The goal is to rotate the rows into columns value. The classicl DECODE function is used there, but there are others ways to achieve the same result (ie: PIVOT operator as from DB 11). This statement can be used for any Flex family, subject that one adapt name of tables.
select p.name name,
 MAX(p.id) id, 
 MAX(to_date(substr(p.createddate,1,10), 'YYYY-MM-DD')) created,  
 MAX(DECODE(c.name, 'title',pm.stringvalue)) title,
 MAX(DECODE(c.name, 'section',pm.stringvalue)) section,
 MAX(DECODE(c.name, 'family',pm.stringvalue)) family,
 MAX(DECODE(c.name, 'category',pm.stringvalue)) cat,
 MAX(DECODE(c.name, 'supplier',pm.stringvalue)) supplier,
 MAX(DECODE(c.name, 'sapcode',pm.stringvalue)) sapcode,
 MAX(DECODE(c.name, 'vendor_number',pm.stringvalue)) vendor_number,
 MAX(DECODE(c.name, 'leveltype',pm.stringvalue)) leveltype,
 MAX(DECODE(c.name, 'description_short',pm.stringvalue)) 
                     description_short,
 MAX(DECODE(c.name, 'millesime',pm.stringvalue)) millesime,
 MAX(DECODE(c.name, 'isseasonal',pm.stringvalue)) isseasonal,
 MAX(DECODE(c.name, 'gme',pm.stringvalue)) gme,
 MAX(DECODE(c.name, 'page',pm.stringvalue)) page,
 MAX(DECODE(c.name, 'areaName',pm.stringvalue)) areaName
 from   catalog_product_mungo pm,
   catalog_product p,
   catalog c
 where pm.cs_ownerid = p.id
 and c.id=pm.cs_attrid
 group by p.name

About the author

GPM Factory