You are on page 1of 38

IBU APEX Projects

Project Social Media Dashboard Content Portal - RSS Change Log Content Portal - Site Map IBU Customer Deliverable Repository Membership Management Dashboard SunSpace SSO Login

Workspace IBU PORTAL STATISTICS SALES CONTENT PORTAL SALES CONTENT PORTAL IBU PROJECTS IBUIPC IBUIPC

Version 1.9

Contents
Social Media Dashboard ............................................................................................................................... 2 Overview ................................................................................................................................................... 2 Data Flow: ................................................................................................................................................. 3 Data Model: .............................................................................................................................................. 3 Report Creation Process: .......................................................................................................................... 6 References ................................................................................................................................................ 7 Content Portal Site Map............................................................................................................................. 8 Overview ................................................................................................................................................... 8 Process to update sitemap........................................................................................................................ 8 Implementation / Data Flow ................................................................................................................... 11 Content Portal RSS Change Log................................................................................................................ 14 Overview ................................................................................................................................................. 14 Components ............................................................................................................................................ 15 A. Corporate UCM ........................................................................................................................... 15 B. APEX RSS Change Log Application ............................................................................................ 15 Supported Parameters ........................................................................................................................ 23 JSONP Callback Function .................................................................................................................. 23 Page View Count ................................................................................................................................. 23 C. Content Portal RSS Widget....................................................................................................... 24 D. Content Portal RSS Overlay ...................................................................................................... 25 Appendix: UCM Search ........................................................................................................................... 26 Appendix: UCM XML Examples ............................................................................................................... 27 Appendix: Import Content From UCM Back To More Then One Day ..................................................... 27 4. IBU Customer Deliverable Repository ................................................................................................ 28 Overview ................................................................................................................................................. 28 Data Flow / Processes ............................................................................................................................. 29 A. Upload Document ....................................................................................................................... 29 B. List Documents............................................................................................................................ 29 C. Download Documents................................................................................................................. 29 UCM Configuration ................................................................................................................................. 30 Membership Management Dashboard....................................................................................................... 31 Contacts .................................................................................................................................................. 31 Overview ................................................................................................................................................. 32 Data Flow / Processes ............................................................................................................................. 33 Scheduled Jobs ........................................................................................................................................ 35 SunSpace SSO Login .................................................................................................................................... 36 Description .............................................................................................................................................. 36

1|Page

Social Media Dashboard


View Social Media Report Dashboard, data is entered manually for a Category, Focus Area, Social Media Account and a snapshot time. The report is created dynamically for the published table report. APEX URL: https://apex.oraclecorp.com APEX Workspace: IBU PORTAL STATISTICS Application URL: https://apex.oraclecorp.com/pls/apex/f?p=2998 Application Authentication: Oracle SSO, expect published table report page (page id: 5) Application Access Control: Only for defined people, expect published table report page (page id: 5)

Maintenance Tasks: Check if the application is functional working, does the public table report show up well formatted. Check if the workspace has enough space left. Enter monthly social media metrics.

Overview
Public Table Report Social Media Activities APEX UI Templates: Page: Report: APEX Tables: CATEGORIES AREAS MEDIA ACCOUNTS Data Source: Social Medias : Facebook, Twiter, Blog DATA DATAVALUES MEDIA_REPORT MEDIA_REPORT_DATE S media_report_dyn media_named_1_dyn media_report_entry_page media_named_entry_form Data Entry Forms Admin Pages

2|Page

Data Flow:
Administration o Administration forms for Category (CATEGORY), Focus Area (AREAS), Social Media Types (MEDIA), Access Control (ACCOUNTS)

Data Capture o Data entry form per report date (DATAVALUES, DATA)

Publish Report o Create and store report to publish (MEDIA_REPORT, MEDIA_REPORT_DATES)

View Report o o o o Count social media offerings Create graph per Social Media Type and per Product Category Show detailed table report Show graph of social media account values for the last 6 months

Data Model:
Tables: CATEGORIES stores the categories Data Type Primary Key Description Primary Key (PK) Category Title Not used

Column Name ID CATEGORY ORDER_ID

NUMBER 1 VARCHAR2(128) NUMBER(2,0) -

AREAS stores the focus areas Data Type NUMBER VARCHAR2(128) NUMBER(2,0) NUMBER VARCHAR2(128) Primary Key 1 Description Primary Key (PK) Area Title Not used FK to CATEGORIES HTML Anchor Name

Column Name ID AREA ORDER_ID CATEGORY_ID ANCHOR

MEDIA stores the social media types 3|Page

The table MEDIA contains two kinds of data: * define the media like Facebook (where value_title = null) * define media metrics like Likes (where value_title is not null) for metrics pos = 1 means, this field does corresponded with the value val_1 from table DATAVALUES

For example, the ACCOUNT does reference the media type like FACEBOOK (id=5), the DATAVALUE does reference an ACCOUNT entry, and has the value 27 for val1, this means this account does have 27 Likes (pos = 1 from MEDIA) and has the value 51 for val2, this means this account does have 51 Members (pos = 2 from MEDIA). Never change the pos id, if the entry has already according data! Column Name ID MEDIA_TITLE VALUE_TITLE ORDER_ID IMAGE POS_ID Data Type NUMBER VARCHAR2(48) VARCHAR2(48) Primary Key Description 1 Example (Media) Primary Key (PK) 1 Media Title Twitter Value Title Order By Icon URL Value ID 1 t.gif 1 Example (Metric) 2 Twitter Tweets

NUMBER(2,0) VARCHAR2(128) NUMBER(2,0) -

ACCOUNTS stores the social media account definitions Data Type NUMBER NUMBER VARCHAR2(48) VARCHAR2(128) VARCHAR2(128) VARCHAR2(128) NUMBER Primary Key Description 1 Primary Key (PK) FK to AREAS Not used Account Title URL Owner Name FK to MEDIA

Column Name ID AREA_ID MEDIA_TYPE ACCOUNT URL OWNER MEDIA_ID Column

DATAVALUES stores raw data per account and report date Data Type Primary Key Description 4|Page

Name ID VAL_0 VAL_1 VAL_2 VAL_3 VAL_4 ACCOUNT_ID REPORT_ID

NUMBER VARCHAR2(128) NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER

1 -

Primary Key (PK) String Value for Pos = 0 Integer Value for Pos = 1 Integer Value for Pos = 2 Integer Value for Pos = 3 Integer Value for Pos = 4 FK to ACCOUNTS FK to MEDIA_REPORT

DATA stores readable data per account and report date (VIEW) This table is populated and updated automatically through the trigger DATAVALUES_T1 which does call the procedure IMPORT_DATA() to convert the data from the table DATAVALUES into a human readable format for the easy use in the table report.

Column Name ID ACCOUNT_ID VALUE REPORT_ID

Data Type NUMBER NUMBER VARCHAR2(128) NUMBER

Primary Key Description 1 Primary Key (PK) FK to ACCOUNTS Human Readable Value FK to MEDIA_REPORT

MEDIA_REPORT_DATES defines a report by title and date Data Type NUMBER VARCHAR2(128) NUMBER(4,0) NUMBER(2,0) NUMBER(2,0) DATE NUMBER Primary Key 1 Description Primary Key (PK) Report Title Year Month Day Timestamp Publish Count

Column Name ID TITLE REPORT_YEAR REPORT_MONTH REPORT_DAY REPORT_DATE PUBLISH_COUNT

MEDIA_REPORT stores the published report Data Type NUMBER NUMBER Primary Key Description FK to MEDIA_REPORT_DATES 1, if current public report 5|Page

Column Name REPORT_ID PUBLISHED

RID CID CATEGORY ANCHOR FID AREA MID MEDIA_TITLE IMAGE AID ACCOUNT URL OWNER VALUE ANCHOR_FOCUS_AREA

NUMBER NUMBER VARCHAR2(128) VARCHAR2(128) NUMBER

VARCHAR2(128) NUMBER VARCHAR2(48) VARCHAR2(128) NUMBER VARCHAR2(128) VARCHAR2(128) VARCHAR2(128) VARCHAR2(128) VARCHAR2(128) -

Table Row Number 1, if 1st row with a new Category Category Title Category Anchor Name >0, if 1st row with a new Focus Area (= count of entries for this Area) Focus Area Title >0, if 1st row with a new Media (= count of entries for this Media) Social Media Title Social Media Icon Url FK to ACCOUNTS Account Title Account Url Account Owner Name Values for this Account Anchor Name for this Focus Area

Report Creation Process:


1. Consider, if the report structure needs to be changed by editing the Categories, Focus Areas, Media Types or the Social Media Accounts. 2. APEX : Enter/Update Statistics and Publish Report: Add Report This does create a new entry in the table MEDIA_REPORT_DATES 3. APEX: Enter/Update Statistics and Publish Report: New Report Title: Edit Open the data entry table report page, the UI templates media_report_entry_page and media_report_entry_form are used. From here data values can be entered for each social media account. The entered values are stored into the table DATAVALUES, a trigger calls the procedure IMPORT_DATA, which does store a human readable data string into the table DATA. 4. APEX: Enter/Update Statistics and Publish Report: Publish Publish the newly created report, this does create call the procedure UPDATE_MEDIA _TABLE(), which does create and store a report into table MEDIA_REPORT. 5. APEX: View Social Media Report Open the public table report page, the UI templates media_report_dyn and media_named_1_dyn are used. Verify the created report, if the data and the formatting are correct. 6|Page

References
AnyChart, XML Reference Guide http://www.anychart.com/products/anychart/docs/xmlReference/index.html AnyChart, Samples Gallery http://www.anychart.com/products/anychart/gallery/

7|Page

Content Portal Site Map


View sitemap of IBU offerings as tree. Create from an excel sheet containing the sitemap definition an html version. APEX URL: https://apex.oraclecorp.com APEX Workspace: SALES CONTENT PORTAL (part of the RSS Change Log Project) Application URL: http://contentportal.oraclecorp.com/ (click on Content Portal Site Map) Application Authentication: Oracle SSO Application Access Control: Only for defined people.

Overview
APEX Application Excel - Sheet Site Map Definition
STEP A STEP C

Content Portal Site Map Overlay Window (Tree View)

Site Map Database (part of RSS Change Log)


STEP B STEP D

APEX Application RSS Change Log (assign file to page from site map tree)

Process to update sitemap


STEP A: Import sitemap structure from excel into database. 1. Open the excel document with the new sitemap structure (Site_Map_v#.#.xlsx). Changes in the spreadsheet are marked yellow. 2. The spread sheet must start with the column titles. (The column titles may not be visible as they have a white font on white background. Select the first row and choose black as font color to make content visible.) 3. Save this document as CSV (Comma delimited) document (Site_Map_v#.#.csv). 4. Open the sitemap apex application 5. Delete table SITEMAP and sequence SITEMAP_SEQ: drop TABLE SITEMAP cascade constraints; drop sequence SITEMAP_SEQ ; 8|Page

6. Import sitemap structure from csv document a. Open APEX Utilities Data Workshop from SQL Workshop b. Select Data Load Spreadsheet Data c. Load To: New table, Load From: Upload file d. File: choose csv file from disk Seperator: , (comma) Optionally Enclosed By: First row contains column names: check File Character Set: Unicode UTF-8 e. Load Data Schema: IBUSCP Table Name: SITEMAP Define Column Mapping (Column A means the first column, B the second, ): Column Column Names A B C D E F G H I J LEVEL_1 LEVEL_2 LEVEL_3 LEVEL_4 Special_Area_Codes Combined_Codes LEVEL_5 URL Dual_Listed Page_Type_UI_or_Folder VARCHAR2 VARCHAR2 255 255 Data Type VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 Length 255 255 255 255 Upload YES YES YES YES NO NO YES YES NO NO

9|Page

Submit: NEXT Primary Key From: Create new column New Primary Key Column: ID PK Constraint Name: SITEMAP_PK Primary Key Population: Generated from a new sequence Sequence: SITEMAP_SEQ Submit: Load Data f. Delete empty entries from table SITEMAP delete sitemap where level_1 is null and level_2 is null and level_3 is null and level_4 is null and level_5 is null and url is null;

STEP B: Download sitemap as html document from apex. On apex, sql workshop, object browser, save & compile the procedure DOWNLOAD_SITEMAP. Call URL: https://apex.oraclecorp.com/pls/apex/IBUSCP.DOWNLOAD_SITEMAP and save this document locally as sitemap.html. We publish the sitemap html structure as static file to the contentportal and the RSS feed admin tool. With this we do have a controlled deployment of changes to production. In principle we could as well use from this applications the url from above and do an ajax request. STEP C: Publish new sitemap structure on contentportal.oraclecorp.com. Copy sitemap.html per SFTP to folder /u02/webapps/apps/htdocs/sitemap on: Hostname: web274.us.oracle.com Port number: 22 Username: apps Password: ###### (ask Prateek for account details) A good too for SFTP is WinSCP: http://winscp.net After the upload verify on the stage http://apps-stage.oraclecorp.com and production http://contentportal.oraclecorp.com the changes. Sync from stage to prod can take some time. STEP D: Publish new sitemap structure on APEX (used from RSS Feed Admin Tool). On apex, open the application builder, Application Sales Content Portal, Shared Components, Files: Static Files and replace the existing sitemap.html file with the new one. Delete the existing file and create a new static file associated with application 11817 Sales Content Portal. Verify if the changes are visible from the RSS Change Log application. 10 | P a g e

Implementation / Data Flow


Sitemap definition a) The sitemap is defined in the table SITEMAP. The creation is described in the process for updating the sitemap. b) The database procedure DOWNLOAD_SITEMAP creates an html version of the sitemap from this table. This procedure can be called from any browser: https://apex.oraclecorp.com/pls/apex/DOWNLOAD_SITEMAP. For showing the sitemap, either this URL can be used to retrieve the data definition or this data is stored into a static file. We have chosen to store this data file under sitemap.html, because we want to publish changes in a controlled way. c) The sitemap is presented as a tree with a third party javascript library called Treeview, http://docs.jquery.com/Plugins/Treeview

How to integrate Site Map Overlay on an html page: Add to into <HEAD> section:
<!-- SiteMap files start--> <link rel="stylesheet" href="./sitemap/css/jquery.treeview.css" type="text/css" /> <script src="./sitemap/js/jquery.treeview.max.js" type="text/javascript"></script> <!-- SiteMap files end--> <!-- RSS files start--> <script src="./RSS/rss_change_log.js" type="text/javascript"></script> <!-- RSS files end-->

Add after <BODY>


<!-- SiteMap Code starts here --> <div id="sitemapContainer" class="rssContainer" style="display:none"> <div style="padding:5px;background:#FF0000;color:#FFF;font-size:16px;font-weight:bold;">Site Map</div> <div id="sitemapResults" class="sitemapResults"></div> <div style="padding-top:10px;text-align:right"><input id="sitemapClose" name="Close" type="button" value="Close"></div> </div> <!-- SiteMap Code ends here -->

11 | P a g e

JavaScript Code The JavaScript code to load and show the sitemap is added to the file rss_change_log.js from the RSS feed.
Move SiteMap- and Background Container to the top, right after <body> $("#sitemapContainer").remove().appendTo("body"); $("#zenbox_rss_screen").remove().appendTo("body"); Show the SiteMap- and Background Container (Code Copied from IBU Search) function showSitemap() { $('#sitemapResults').html('Loading Site Map...'); srchContent = ""; var w = 1024, h = 768; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } var topPos = (winH-560)/2, leftPos = (winW-800)/2; document.getElementById('sitemapContainer').style.top = topPos; document.getElementById('sitemapContainer').style.left = leftPos; $('#zenbox_rss_screen').show(); $('#sitemapContainer').show(); getSitemap(); } Hide the SiteMap- and Background Container function hideSitemap() { $('#zenbox_rss_screen').hide(); $('#sitemapContainer').hide(); }

12 | P a g e

Load the sitemap.html file, append content to UI, render code with treeview() function getSitemap() { AJAX request $.ajax({ URL or file path url: "./sitemap/sitemap.html", Cache ajax response cache: true, On success: success: function(html){ Insert result html into #sitemapResults element $('#sitemapResults').html(html); Render element #example contained in result html as tree $("#example").treeview({ control: "#treecontrol", persist: "location", cookieId: "treeview-black", collapsed: false }); Collapse Tree (work around for IE, having two function calls, instead setting above collapsed to tue) $('#treecontrol a:eq(0)').click(); } }); } When the web page is loaded: $(document).ready(function(){ On ESC-Key hide SiteMap $(document).keyup(function(e) { if (e.keyCode == 27) { hideRssFeed(); hideSitemap(); } }); Click on #sitemap element, show SiteMap $("#sitemap").click(function() { showSitemap(); }); Click on #sitemapClose element, hide SiteMap $("#sitemapClose").click(function(e) { hideSitemap(); // Close Button }); });

// esc

13 | P a g e

Content Portal RSS Change Log


APEX URL: https://apex.oraclecorp.com APEX Workspace: SALES CONTENT PORTAL Application URL: https://apex.oraclecorp.com/pls/apex/f?p=11817 Application Authentication: Oracle SSO, except Update Log Widget (page id: 20) Application Access Control: Only for defined people, except Update Log Widget (page id: 20) Maintenance Tasks: Check if the workspace has enough space left.

Overview
Corporate UCM Contribution Consumption RSS Widget RSS Overlay Window contentportal.oraclecorp.com

RAW Data

apex.oraclecorp.com

Administrative Tasks
last x entries list all entries

Database

14 | P a g e

Components
A. Corporate UCM The corporate UCM deployment has two instances, one to contribute - and one to consume content. Both offer a web service (ws) interface to pull and push data. We use the ws interface on consumption, to retrieve newly created or updated documents and links. Over the ws interface from contribution; we retrieve the version id of the content item, because this information is missing on the consumption instance. The UCM Service Reference Guide can be found here:

10g:
http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/serv ices_reference_10gr3en.pdf 11g: http://download.oracle.com/docs/cd/E14571_01/doc.1111/e10807/web_services001.htm#CHDBFBC G We are leveraging the search service, to retrieve newly added or updated content with filters on the accounts we use: ((dDocAccount <contains> `EMPL/IBU/PORTAL*` <OR>dDocAccount <contains> `EMPL/IBU/ABU/CRM*` <OR>dDocAccount <matches> `EMPL/IBU/ABU/ATG` <OR>dDocAccount <matches> `EMPL/GBU/PGBU` <OR> dDocAccount <matches> `EMPL/IBU/TECH`) <AND>dSecurityGroup <matches> `Public`) B. APEX RSS Change Log Application a. Pull data from UCM This functionality is implemented with database procedures and functions. APEX offers a library (apex_web_service) to do web service request, which is documented here: http://apex.oracle.com/i/doc/AEAPI/apex_web_service.htm The service does return a XML document, which is imported into a temporary table using XMLTABLE and XMLNAMESPACES to parse the attributes we are interested. Interaction Model: Get RAW Data from UCM 15 | P a g e

A: PROCEDURE.RSS_UPDATE_FROM_UCM |-- B: FUNCTION.RSS_CHECK_UCM |-- C: FUNCTION.RSS_CHECK_UCM_FOLDER |-- D: FUNCTION.RSS_CHECK_UCM_CONTRIBUTION_DID |-- E: PROCEDURE. RSS_REMOVE_DELETED_ENTRIES A: Main procedure, called from scheduler to retrieve and update data from UCM. B: Search query against UCM (UCM Service: Search). C: Resolve folder id into name (UCM Service: COLLECTION_GET_INFO). D: Retrieve revision id of content item (UCM Service: DOC_INFO_BY_NAME). E: Remove items from the database, which have the status DELETED for 30 days. Mapping between UCM Attributes and Table RSS_ITEM UCM Contribution UCM Consumption Table RSS_ITEM ID CHANNEL Description

PK from Sequence FK to table channel, in case we support more as one feed dDocTitle or manual entry xURLItem or manual entry (Download Link) manual entry (Page Link) manual entry dDocAuthor or manual entry dInDate or manual entry dInDate or manual entry 0 = from UCM,

TITLE

LINK

PAGE_LINK

DESCRIPTION AUTHOR

CREATED

UPDATED

MANUAL

16 | P a g e

1 = manual entry CLUE Scenarios, kind and status of info entry Info status

STATUS dID dDocName xKeywords xCollectionID xProduct xLanguage xIndustry xRegion xCountry xSolutionArea xWebsites xWebsiteSection dDocTitle xDescription dDocAuthor url dInDate dDocID dOriginalName dFormat UCM_DID UCM_DDOCNAME UCM_XKEYWORDS UCM_XCOLLECTIONID UCM_XPRODUCT UCM_XLANGUAGE UCM_XINDUSTRY UCM_XREGION UCM_XCOUNTRY UCM_XSOLUTIONAREA UCM_XWEBSITES UCM_XWEBSITESECTION UCM_DDOCTITLE UCM_XDESCRIPTION UCM_DDOCAUTHOR UCM_URL UCM_DINDATE UCM_DDOCID UCM_DORIGINALNAME UCM_DFORMAT

17 | P a g e

dExtension dCreateDate webFileSize vaultFileSize xURLItem dDocAccount dID dRevisionID dRevLabel dFileSize

UCM_DEXTENSION UCM_DCREATEDATE UCM_WEBFILESIZE UCM_VAULTFILESIZE UCM_XURLITEM UCM_DDOCACCOUNT UCM_CONTRIBUTION_DID UCM_CONTRIBUTION_DREVISIONID UCM_CONTRIBUTION_DREVLABEL UCM_CONTRIBUTION_DFILESIZE

Attribute: CLUE The clue describes the kind of the information item (scenarios), is it a document or URL, was it newly added or updated. Non UCM items are labeled as Manually Entered. CLUE Schema:

18 | P a g e

Add
If record does NOT exist 1 in local DB and revisionID equals 1 in contribution and format not xml and format does NOT contain 'idcmeta'

Update Document
[(If record does NOT exist in2 local DB and revisionID >1 in contribution) or (If record exists in local DB and filesize changes)] and format not xml and format does NOT contain 'idcmeta Hint = UPDATED Document

Update Metadata
3

Item Type: Document

Do NOT collect records for this scenario

Hint = NEW Document


If record does NOT exist in local DB and revisionID equals 1 in contribution and format not xml and format does contain 'idcmeta' Hint = NEW URL Item

Item Type: URL

Scenario does not exist

Do NOT collect records for this scenario

RSS CLUE (APEX List of Values) CLUE ID Label NEW Document 1 UPDATED Document 2 NEW URL Item 4 Manually Entered 10 Attribute: STATUS Describes the current status of the item. RSS STATUS (APEX List of Values) STATUS ID Label Deleted 1 Suggest (RAW Data from UCM) 2 In Review 3 Published 4

Attribute: MANUAL Describes it the element was created from UCM or manually. 19 | P a g e

RSS SOURCE (APEX List of Values) SOURCE ID Label UCM (Item Created from UCM) 0 MANUAL (Item Created Manualy) 1

Database Tables Table Name RSS_ITEM RSS_FOLDER Description Main table, keeps all entries Contains list with folder details: collection id, - parent id, - name and path. Populated from FUNCTION.RSS_CHECK_UCM_FOLDER RSS_CONFIGURATION Stores the settings, like UCM service url and UCM account to be used (username / pasword) RSS_CHANNEL Describes a feed with a title and the search query. We currently do have one feed. RSS_LOG Several activities are logged into this table with the procedure ADD_LOG. Same mechanism as in the application CDR. RSS_STATISTICS Capture monthly rss view statistics, procedure RSS does call procedure RSS_INCREMENT_VIEW to increment the counter each time the RSS Feed was requested.

IMPORTANT
RSS_CONFIGURATION table settings have been changed following the upgrade of the Consumption server to 11g version and subsequent authentication errors faced while attempting to sign in. UCM_SERVICE_URL CHANGED TO http://my.oracle.com/content/ FROM http://my.oracle.com/content/idcplg

UCM_SERVICE_URL_CONTRIBUTION CHANGED TO http://content.oracle.com/_dav/content 20 | P a g e

FROM http://content.oracle.com/_dav/content/idcplg

Moreover, we no longer sign onto the Consumption server as a Search query can be performed against it without signing in. Therefore, the web service call made on Consumption server has been CHANGED FROM: l_xml := apex_web_service.make_request( p_url => c_UCM_SERVICE_URL, p_action => c_UCM_ACTION, p_envelope => l_envelope, p_username => c_UCM_USER_NAME, p_password => c_UCM_USER_PASSWORD ); TO: l_xml := apex_web_service.make_request( p_url => c_UCM_SERVICE_URL, p_action => c_UCM_ACTION, p_envelope => l_envelope ); to remove Basic authentication.

b. Administrate Feed Entries The apex application provides a list of all entries and their status: RAW Feed, In Review or Published. All entries can be edited; the edit view shows as well all available attributes from UCM. Several administrative tasks can be managed as well, by providing the UCM connection settings, the application access conditions, controlling scheduled tasks and showing an activity log. All this pages are implemented with basic apex functionalities. c. Publish RSS Feed The RSS feed is created with the sql procedure RSS. The procedure does use XMLElement and XMLAgg to create the XML RSS feed.

21 | P a g e

URL: https://apex.oraclecorp.com/pls/apex/IBUSCP.RSS (Grant EXECUTE privilege to PUBLIC and PEOPLE_PUBLIC, to make the feed available for anonymous users. ) Mapping between feed and database:
RSS FEED Source Code <?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"> <channel> <title>Oracle Sales &amp; Marketing Content Portal</title> <link>https://apex.oraclecorp.com/pls/apex/IBUSCP.RSS?feed=1</link> <description>Sales & Marketing Content Portal </description> <language>en-us</language> <copywrite>Copyright 2011 Oracle. All Rights Reserved.</copywrite> <item> <pubDate>Mon, 20 Jun 2011 00:00:00</pubDate> <title>Sun x86 Executive Customer Overview</title> <link>http://my.oracle.com/content/.../cnt722335.pptx</link> <guid>http://my.oracle.com/content/.../cnt722335.pptx</guid> <author>CARL.RAY@ORACLE.COM</author> <description>High-level executive overview of </description> </item> <item> next item Database

static static static static 1st Item nvl(updated ,created) title link link author description 2nd Item

22 | P a g e

Supported Parameters Following parameters are supported: Name feed itemCount pastDays callback Default 1 1000 0 null Description Id of the requested feed (Table CHANNEL) Max number of items to be returned If >0 then filter entries for the past x days Name of the callback method (see JSONP)

JSONP Callback Function This procedure does as well support JSONP for cross-domain ajax requests. If a callback method is defined, the content from above (RSS Feed Data) is embedded into a javascript function (callback method) with the provided name containing a JSONP object with the RSS XML code. The procedure does escape special characters from the RSS XML code. Sample Request: https://apex.oraclecorp.com/pls/apex/IBUSCP.RSS?callback=jsonp1310103524170&feed=1&ite mCount=12 Response Code Structure: jsonp1310103524170({"xml": "&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF8&quot;?&gt;&lt;rss version=&quot;2.0&quot;&gt; &lt;channel&gt; &lt;title&gt;Oracle Sales &amp;amp; Marketing Content Portal&lt;/title&gt; &lt;/channel&gt;&lt;/rss&gt;"});

Page View Count The RSS procedure does call for each request the procedure RSS_INCREMENT_VIEW() to increment the monthly view counter stored in the table RSS_STATISTICS.

23 | P a g e

C. Content Portal RSS Widget The RSS widget does an ajax request to retrieve the rss feed, then it transforms the xml code into html with a third party jquery libraries to read and transform xml. Convert XML to JSON: http://www.terracoder.com/index.php/xml-objectifier HTML Template: https://github.com/jquery/jquery-tmpl Scrollable UI: http://flowplayer.org/tools/scrollable/index.html Java script code, explained:
-- ajax request for rss feed url $.getJSON("https://apex.oraclecorp.com/pls/apex/IBUSCP.RSS?callback=?", -- feed url properties, feed id and count of items to be returned { feed:1, itemCount:12 }, function (data) { -- unescape response var jsonp = $.unescape(data.xml); -- convert xml to json var xml = $.createXMLDocument(jsonp); var json = $.xmlToJSON(xml); -- define and use template, render json as html, append html to element #rss_list var markup = '<div><div class="item"><a target="_blank" href="${link[0].Text}" class="txt11" title="${title[0].Text}">${title[0].Text}</a></div></div>'; $.template( "rssItemTemplate", markup ); $.tmpl( "rssItemTemplate", json.channel[0].item ).appendTo( "#rss_list" ); --configure scrollable element behaviour $(".scrollable").scrollable({ circular: true, vertical: true, mousewheel: true, speed: 1000 }).autoscroll({ autoplay: true, intervall: 10000 }); });

The RSS data is requested as a callback js method in the JSON format. Browsers do not allow to do cross domain ajax requests for executable code. JSONP is a work around technique for this limitation. JSONP Cross Domain Request, check further information following links http://www.ibm.com/developerworks/library/wa-aj-jsonp1/ http://en.wikipedia.org/wiki/JSON

24 | P a g e

D. Content Portal RSS Overlays The RSS Overlay does work similar as the Widget. The difference is, it does pull data for the last 7 days or the last 100 entries. The items are shown in an overlay window with the option to scroll. The overlay is coded in the same way as the search is done on the contentportal. How to embed the RSS Widget and the RSS Overlay on an html page:
RSS feed url (add inside of <head> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="https ://apex.oraclecorp.com/pls/apex/IBUSCP.RSS?feed=1" /> RSS html widget Add html container with the id rss_content: <td id="rss_content" width="33%" align="center" valign="middle" width="33%"></td> Link JS sources (or download this files and link them locally) <script src="https://apex.oraclecorp.com/pls/apex/wwv_flow_file_mgr.get_file? p_fname=jquery.tools.min.js"></script> <script src="https://apex.oraclecorp.com/pls/apex/wwv_flow_file_mgr.get_file?p_fname=jqXMLUtils.pack.js " type="text/javascript"></script> <script src="https://apex.oraclecorp.com/pls/apex/wwv_flow_file_mgr.get_file?p_fname=jquery.tmpl.min.js " type="text/javascript"></script> <script src="https://apex.oraclecorp.com/pls/apex/wwv_flow_file_mgr.get_file?p_fname=rss_change_log.js" type="text/javascript"></script> Link CSS sources (or download this files and link them locally) <link rel="stylesheet" type="text/css" href="https://apex.oraclecorp.com/pls/apex/wwv_flow_file_mgr.get_file?p_fname=rss.css"/> <link rel="stylesheet" type="text/css" href="https://apex.oraclecorp.com/pls/apex/wwv_flow_file_mgr.get_file?p_fname=rss_change_log.cs s"/> Add html code from the file rss_change_log.html

25 | P a g e

Appendix: UCM Search


It is possible to build and test advanced UCM searc queries via the user interface. Login to UCM: http://my.oracle.com/content Edit the Targeted Quick Searches Click on the icon left from the search text form, select Edit

Create Targeted Quick Search Select on, Create New Define new Targeted Quick Search Targeted Quick Search Key: <a key> Targeted Quick Search Label: <a label> Enter search terms: #s#
Query Builder: use query builder or use show advanced options modify/add manually a query, like:

( dDocAccount <contains> `EMPL/IBU/PORTAL*` <OR>dDocAccount <contains> `EMPL/IBU/ABU/CRM*` <OR>dDocAccount <matches> `EMPL/IBU/ABU/ATG` <OR>dDocAccount <matches> `EMPL/IBU/TECH` ) <AND>dSecurityGroup <matches> `Public` ) <AND>dInDate >= `04/08/2011 00:00:00` <AND>dInDate < `04/09/2011 00:00:00` <AND>(<ftx>#s</ftx>)

26 | P a g e

Appendix: UCM XML Examples


In UCM UI, you can add &IsSoap=1 to the URL you have requested. Then you get back a SOAP response with XML content. For example: This URL calls the details for the UCM document item with the Id=847489, the result is shown in the XML notation. http://my.oracle.com/content/idcplg?IdcService=DOC_INFO&dID=847489&dDocName=CNT917214&IsS oap=1

Appendix: Import Content From UCM Back To More Then One Day 1. Edit Function RSS_CHANGE_LOG a. Look for
-- ### TO RUN IMPORT BACK FOR MORE THEN ONE DAY

b. Set sysdate-1 to the count of days you want to import data from UCM, like
sysdate-5 for 5 days.

2. From the Job Scheduler, run the program P_UPDATE_FEED_1 manually. 3. Check the Activity Log, if the program is running and importing data from UCM. 4. When the import is finished, reset the change from 1. to sysdate-1.

27 | P a g e

IBU Customer Deliverable Repository


APEX application to upload, list and download documents. Metadata is stored in APEX and the physical file at UCM. APEX URL: https://apex.oraclecorp.com APEX Workspace: IBU PROJECTS Application URL: https://apex.oraclecorp.com/pls/apex/f?p=19880 Application Authentication: Oracle SSO Application Access Control:

Overview
Web Browser

A: Upload Document B: List Documents C: Download Document

apex.oraclecorp.com Upload Form, Content Listing Administrative Tasks

UCM

A: Move File to UCM

Documents

Database Scheduler

28 | P a g e

Data Flow / Processes


A. Upload Document (Page 6) The application offers a web form to upload a document, which is described by several metadata and the main file. User: Data is added into the web form (metadata and the file). 1. User: Data submitted to the apex application. 2. APEX: A new data record is created to store the metadata and the file into the apex database. APEX: Copy file to UCM. Retrieve UCM file Id and download URL. If successful, delete file from database. Database Function: ASSET_COPYFILETOUCM() This method is implemented with the apex web service library (http://apex.oracle.com/i/doc/AEAPI/apex_web_service.htm) which does soap calls against the UCM web service interface (http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/ser vices_reference_10gr3en.pdf). 3. APEX: Sends a confirmation page for the successful upload back to the user. 4. SCHEDULER: Check for files to move from DB to UCM, in case the first try did fail, because of UCM was not available or something else. The scheduler is implemented with the DBMS_SCHEDULER sql package (http://www.oraclebase.com/articles/10g/Scheduler10g.php). 5. APEX: All activities are logged into the table LOG.

B. List Documents (Page 5) Implemented with default apex functionalities. C. Download Documents APEX shows UCM download link if available, otherwise download link from database. 29 | P a g e

UCM Configuration
We leverage the UCM instance of WebCenter. The UCM settings are defined in the table CONFIGURATION. In case of issues with this UCM instance, contact the WebCenter team or jon.halson@oracle.com. The UCM folder is associated with the space IBU_CDR on WebCenter. WebCenter Space: http://webcenter.us.oracle.com/webcenter/spaces/IBU_CDR/page/Documents WebCenter UCM: http://webcenterucm.us.oracle.com/wir_idc/idcplg?IdcService=COLLECTION_DISPLAY&hasCollectionID=1&dCollectionID= 37955 Settings:
UCM Service Url UCM Download Url UCM User Name UCM User Password UCM Security Group UCM Account UCM Folder Id

http://webcenter-ucm.us.oracle.com/_dav/wir_idc/idcplg http://webcenter-ucm.us.oracle.com/wir_idc/idcplg?IdcService=GET_FILE&dID= ibu_cdr@oracle.com ibu4CDR10 WIR WIR/s6d2b4667_5186_4028_85ba_5d4bd3df4596 List of folder Ids. UCM has a limitation of 500 items per folder. Due this we need to create manually folders in advance, before they are used. Regularly check if enough empty folders are available, if not create new ones from WebCenter Space and look up the folder id from UCM.

30 | P a g e

Membership Management Dashboard


Membership Management Dashboard which provides online report access to current, historical, and net change industry community membership details. Current Status Reports display total current membership counts for all communities with regional break outs. Membership History Reports display end of month community membership counts for prior periods, again with regional break outs.

This dashboard reports memberships for the IBU Industry Communities on WebCenter. People register on APS for an email alias to be member of a community. IT does synchronize email aliases with ldap groups, from which we get the community group names and the members. APEX URL: https://apex.oraclecorp.com APEX Workspace: IBUIPC Application URL: https://apex.oraclecorp.com/pls/apex/f?p=29175 Application Authentication: Oracle SSO (*) Application Access Control: Only for defined people (*) (*) Expect the community members report (page id: 27)

Maintenance Tasks: Check if the application is functional working. Check if the workspace has enough space left.

Contacts
Industry Communities, APS Email Aliases Nina Purvis (nina.purvis@oracle.com) Deborah Spies (deborah.spies@oracle.com) -- Provides WebCenter User Support Email LDAP Group Sync Script Chirag Andani (chirag.andani@oracle.com) WebCenter Jon Halson (jon.halson@oracle.com) From our team is Peter involved, he does provide technical support for WebCenter. Jeff and Peter worked out with IT the email alias to ldap group sync process. 31 | P a g e

Overview
Browser
Current Reports Histroical Reports by Month / FYQ

apex.oraclecorp.com

View Current Data Groups Members

View Historical Data Report by Date Report by FYQ

UpdateGroupMembers()

UpdateMemberDetails()

ldap.oracle.com Groups
cn=IBUIPC,cn=groups, dc=oracle,dc=com

Members

Users
%,dc=oracle,dc=com

aps.oracle.com
Email Aliases

32 | P a g e

Data Flow / Processes


A. Synchronize LDAP Groups and Memberships with APEX LDAP groups we are interested into are stored at the base 'cn=IBUIPC, cn=groups, dc=oracle, dc=com'. The ldap directory can be viewed with an ldap browser, like http://jxplorer.org/. Connection settings: Host=ldap.oracle.com, Port=389, Base DN=dc=oracle,dc=com, User=Anonymous. The database procedure MSR_SYNCLDAPGROUPANDMEMBERS() does lookup the ldap groups and members and store them into the tables: MSR_GROUPS MSR_MEMBERS MSR_COUNTRIES MSR_CITIES MSR_MEMBERSHIPS MSR_ACTIVITIES ldap group title and DN ldap user name, DN, email, job, manager, region, country list of countries with name and country code list of cities memberships of a user with the from and to date log table of system activities and results

The ldap group does provide the list of the current members. The ldap sync procedure does have to check the current members list from ldap against the list stored in apex. Table MSR_MEMBERSHIPS GROUPDN MEMBERDN ACTIVE CREATED UPDATED PROCESSING FK to table GROUPS FK to table MEMBERS 1 = entry is a valid membership 0 = entry is terminated membership date/time when this membership was first seen on ldap during a sync date/time when this entry has been seen on ldap during the last sync helper attribute for the sync processing

Between ldap calls is the procedure WAITSECONDS() called, to avoid producing too much load against the corporate ldap instance. The procedure is implemented with the pl/sql package DBMS_LDAP (http://download.oracle.com/docs/cd/B10464_05/manage.904/b10461/dbmsldap.htm). 33 | P a g e

B. Update APEX Group Members from LDAP As in the step A, groups and memberships were updated, this procedure MSR_SYNCLDAPMEMBERDETAILS does update existing apex group members from ldap (email, location, ). The tables MSR_MEMBERS, MSR_CITIES, MSR_COUNTRIES are updated. C. Create Historical Report The procedure MSR_CREATE_REPORT does create the report numbers from the underlying data in GROUPS, MEMBERSHIPS and MEMBERS for a given period (month or FYQ). The report is stored into the tables: MSR_TIMES MSR_REPORTS MSR_REPORT_ENTRIES report date and type (calendar or FYQ) current report with date report entries for each group (member-, joinand leave count)

D. View Report From the report tables are two materialized views created (updated every hour); MSR_MEMBERS_REPORT MSR_MEMBERS_REPORT_FYQ report in the calendar format. Report in the FYQ format.

From the current tables (MSR_GROUPS, MSR_MEMBERS, MSR_MEMBERSHIPS) is one materialized views created (updated every hour); MSR_M_GROUPMEMBERSCOUNT Current members count per group and time zone.

These materialized views are used from the apex report user interface. The reports are shown through standard APEX UI, leveraging the dynamic report and chart region.

34 | P a g e

Scheduled Jobs
Job Name / Program Name / SQL Process Name
UPDATEMEMBERDETAILS _JOB UPDATEMEMBERDETAILS_PROGRAM MSR_SYNCLDAPMEMBERDETAILS UPDATEGROUPMEMBERS_JOB UPDATEGROUPMEMBERS_PROGRAM MSR_SYNCLDAPGROUPANDMEMBERS UPDATE_REPORT_JOB UPDATE_REPORT MSR_CREATE_REPORT UPDATE_REPORT_FYQ_JOB UPDATE_REPORT_FYQ MSR_CREATE_REPORT(FYQ)

Frequency

Description

WEEKLY DAILY

Update all user records in apex from ldap. Retrieve all ldap groups and members from ldap for the base 'cn=IBUIPC, cn=groups, dc=oracle, dc=com' and update apex. Calculate and update the calendar report. Calculate and update the finance year report.

DAILY DAILY

35 | P a g e

SunSpace SSO Login


Authenticate the user against Oracle SSO Login. Write a SunSpace SSO token. Redirect the user to SunSpace. APEX URL: https://apex.oraclecorp.com APEX Workspace: IBUIPC Application URL: https://apex.oraclecorp.com/pls/apex/f?p=9672:4 Application Authentication: Oracle SSO Application Access Control: Only for authenticated users

Maintenance Tasks: Check if the SunSpace Login does work.

Description
This application consists of one page. The page is configured, that only authenticated people can access it, if not they are redirected to the Oracle SSO Login. If the user is authenticated, the user is redirected to SunSpace with the encrypted user id appended in a request attribute together with the provided session id from the login request. Login process: 1. User does access SunSpace 2. SunSpace redirects user to APEX SunSpace SSO Login (page id: 4), if the user is not authenticated. Append SunSpace session id as parameter (P4_SESSION). Sample URL: https://apex.oraclecorp.com/pls/apex/f?p=9672:4:::::P4_SESSION:9CE2C287468E2DD17038FE8 5FD3424F5 3. APEX SunSpace SSO Login redirect user to Oracle SSO Login, if user does not have a valid Oracle SSO session. 4. Oracle SSO Login, authenticate user, redirect user back to APEX. 5. APEX SunSpace SSO Login encrypts user id and SunSpace session id and adds it to the request parameter token'. Add cookie 'sunspace_sso' with the user id. Redirect to SunSpace. 6. SunSpace, authenticate user from the request parameter 'token'. Source Code: 36 | P a g e

BEGIN // set mime type OWA_UTIL.mime_header('text/html', false); // append cookie with user name OWA_COOKIE.send (name => 'sunspace_sso', value => APEX_CUSTOM_AUTH.GET_USERNAME, expires => sysdate + 1, path=>'/', domain=> '.sun.com'); // redirect to sunspace with encrypted user name and session id as request parameter OWA_UTIL.redirect_url('https://sunspace.sfbay.sun.com/pim/login/index_oracle.jsp?token='||IBUIPC.S UNSPACE_ENCRYPT(APEX_CUSTOM_AUTH.GET_USERNAME||','||:P4_SESSION)) END;

37 | P a g e

You might also like