Tuesday Jun 12, 2012

Downloading specific video renditions in WebCenter Content

I recently had a question come up on one of my previous blog articles about downloading a specific video rendition.  When accessing image renditions, you simply need to pass in the 'Rendition=<rendition name>' parameter on the GET_FILE service and it will be returned.  But when you try that with videos, you get the error message, "Unable to download '<Content ID>'. The rendition or attachment '<Rendition Name>' could not be found in the list manifest of the revision with internal revision ID '<dID>'.

Rendition Download error

Through the interface, it exposes the ability to download, but utilizes the Content Basket to bundle one or more videos and download them as a zip.  

Rendition Information

I had never tried this with videos, but thought they had worked the same way.  Well, it turns out you need to pass in an extra parameter in the case of videos.  So if you pass in parameter of 'AuxRenditionType=media', that will allow the GET_FILE service to download the video (e.g. http://server/cs/idcplg?IdcService=GET_FILE&dID=11012&dDocName=WCCBASE9010812&allowInterrupt=1 &Rendition=QuickTime&AuxRenditionType=media). 

And if you haven't seen the David After Dentist video, I'd highly recommend it! 

Wednesday Jun 06, 2012

WebCenter Content shared folders for clustering

When configuring a WebCenter Content (WCC) cluster, one of the things which makes it unique from some other WebLogic Server applications is its requirement for a shared file system.  This is actually not any different then 10g and previous versions of UCM when it ran directly on a JVM.  And while it is simple enough to say it needs a shared file system, there are some crucial details in how those directories are configured. And if they aren't followed, you may result in some unwanted behavior. This blog post will go into the details on how exactly the file systems should be split and what options are required.[Read More]

Thursday Mar 29, 2012

Crawling a Content Folio

Content Folios in WebCenter Content allow you to assemble, track, and access a logical group of documents and/or links.  It allows you to manage them as just a list of items (simple folio) or organized as a hierarchy (advanced folio).  The built-in UI in content server allows you to work with these folios, but publishing them or consuming them externally can be a bit of a challenge.  

The folios themselves are actually XML files that contain the structure, attributes, and pointers to the content items.  So to publish this somewhere, such as a Site Studio page, you could perhaps use an XML parser to traverse the structure and create your output.  But XML parsers are not always the easiest or most efficient to use. 

In order to more easily crawl and consume a Content Folio, Ed Bryant - Principal Sales Consultant, wrote a component to do just that.  His component adds a service which does all the work for you and returns the folio structure as a simple resultset.  So consuming and publishing that folio on a Site Studio page or in your portal using RIDC is a breeze! 

For example, let's take an advanced Content Folio example like this:

Folio view

If we look at the native file, the XML looks like this:

Folio xml

But if we access the folio using the new service - http://server/cs/idcplg?IdcService=FOLIO_CRAWL&dDocName=ecm008003&IsPageDebug=1 - this is what the result set looks like (using the IsPageDebug parameter).

Folio result set

Given this as the result set, it makes it very easy to consume and repurpose that folio.

You can download a copy of the sample component here. Special thanks to Ed for letting me share this component!

Thursday Mar 22, 2012

Full-text indexing? You must read this

For those of you who may have missed it, Peter Flies, Principal Technical Support Engineer for WebCenter Content, gave an excellent webcast on database searching and indexing in WebCenter Content.  It's available for replay along with a download of the slidedeck.  Look for the one titled 'WebCenter Content: Database Searching and Indexing'.

One of the items he led with...and concluded with...was a recommendation on optimizing your search collection if you are using full-text searching with the Oracle database.  This can greatly improve your search performance.  And this would apply to both Oracle Text Search and DATABASE.FULLTEXT search methods.  Peter describes how a collection can become fragmented over time as content is added, updated, and deleted.  Just like you should defragment your hard drive from time to time to get your files placed on the disk in the most optimal way, you should do the same for the search collection. And optimizing the collection is just a simple procedure call that can be scheduled to be run automatically.  

ctx_ddl.optimize_index('FT_IDCTEXT1','FULL', parallel_degree =>'1');

When I checked my own test instance, I found my collection had a row fragmentation of about 80%

Original fragmentation

After running the optimization procedure, it went down to 0%

After optimizing

The knowledgebase article On Index Fragmentation and Optimization When Using OracleTextSearch or DATABASE.FULLTEXT [ID 1087777.1] goes into detail on how to check your current index fragmentation, how to run the procedure, and then how to schedule the procedure to run automatically.  While the article mentions scheduling the job weekly, Peter says he now is recommending this be run daily, especially on more active systems.

And just as a reminder, be sure to involve your DBA with your WebCenter Content implementation as you go to production and over time.  We recently had a customer complain of slow performance of the application when it was discovered the database was starving for memory.  So it's always helpful to keep a watchful eye on your database.

Wednesday Mar 14, 2012

Improving WebCenter Content Search Performance

If you don't follow the Oracle WebCenter Content Alerts blog, you may have missed the announcement about the 'WebCenter Content: Database Searching and Indexing' webcast happening tomorrow.  It's happening on March 15, 2012 at 16:00 UK / 17:00 CET / 8:00 am Pacific / 9:00 am Mountain / 11:00 am Eastern. For details, go to https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1399682.1

This will cover some great tips on tracing and optimizing search within WebCenter Content.  I plan on attending and learning a few things myself!

[UPDATE 3/22/12]

For those who attended the webcast, I hope you found it helpful and informative.  I certainly did learn a few things myself!  The session was recorded and is available here along with the slide deck.   

Thursday Mar 08, 2012

Creating custom report templates with BI Publisher

In the records management capabilities within WebCenter Content 11g, reports that are created are generated by a runtime version of Oracle BI Publisher.  In order to create those reports, there are report templates that are checked in during the initial configuration of records management.  These templates are in rich-text format (RTF) and can be easily modified in Word.  To make simple changes within the existing templates, you can simply check them out, download the RTF file, modify them in Word, and check in a new revision.  But to make more complex changes such as the input data into the report or to create a whole new report templates, that involves using the BI Publisher client to help design those templates.  I'll walk through a simple example of creating a new report template from scratch and then adding that template into WebCenter Content: Records.  In this sample report, we'll create a new Search Results report and output some custom metadata to the report.

The first step is to download and install the Oracle BI Publisher Desktop for Windows utility.  Install this on your Windows client machine that has Microsoft Word installed.  This will add a new menu choice or ribbon for BI Publisher.

publisher ribbon

Next, we need to turn on the proper rights within our 'rmaadmin' role to enable customization of the reports.  In WebCenter Content, login as an administrator and go to Administration -> Admin Applets -> User Admin.  From the menu, go to Security -> Permissions by Role.  Highlight the 'rmaadmin' role (or role you want to grant this access to) and click Edit RMA Rights. On the Admin tab, check the 'Customization' box.


Now log in as a user with the rmaadmin role.  In the menus, you should now have the additional choices within Records -> Configure -> Reports.

Reports Menu

Select the  'Download BI XML Data' choice in the menu.  This will give you a list of the types of data you can export as part of the report.  In our example, we'll select the 'Content' choice.  Then click the Download button and download that to your local system. 

Now go to Microsoft Word and start a new document.  Apply whatever look & feel, headers & footers, etc you want for the template.  Now go to the BI Publisher menu and select Load Data -> Sample XML. Select the XML file that saved previously.  It should report that data was loaded successfully.


Now position the mouse where the table of results should appear.  Click Table Wizard in the menu.  Select the report format of 'Table' and click next.

Table format

For the Data Set, select '/InternalContent/Values' and click Next.

Data set

You can now select the fields you want added to the table. Once selected, click Finish.

It should now add a table automatically for you.  The headers can be changed to reflect the display value for the field name.

Table added

Now that we have our report template, save it out in rich text format (RTF).  Now we can add this into WebCenter Content as our new template.  Go back to the browser where you are logged in with the rmaadmin role.  Go to Records -> Configure -> Reports -> Templates.  Select the type of Report Template.  In this case, we'll select 'Content' and click Configure. 

Template Choices

In the results menu, click 'Check In New Template'.  Fill out the appropriate metadata, browse to the RTF file, and submit the template. 

Now that we have the template established, we need to create the report object itself.  Go to Records -> Configure -> Reports ->  Create New Report.  Select the type of report, in this case Content and click Configure.  In this case, we're not actually submitting a file.  Instead, we're associating our report with the report template and the service we want to tie it to.  Fill out the standard Type, Title, Security Group and other fields and scroll to the Report Template field.  Because we selected a report type of Content, we should see the list of templates associated with that type including the one we just added.  Select that from the list.  For Report Format, select the format of the report you want generated.  For Report Source Type, you have 3 choices: Service, Query, and Dynamic Query.  The Service and Query would use predefined services or direct database query statements.  Dynamic Query allows you to define a particular search query for results.  In this example, we want to rely on the results coming back from the users' searches, so we'll pick 'Service'.  For Report Source, click 'Add New'.  In the report sources dialog, scroll down to the 'GET_SEARCH_RESULTS' service and move that into the Report Source Services list.

Report Sources

This should now be in the Report Source field.

Report Check-In

There are also choices to modify the source parameters of the service as well as the ability to schedule the report to be run at certain times.  In this example, neither option is necessary.  Fill out the rest of the form and check-in the report.

Now when you do a search, you should now have the report template available to run the report:

Search Result menu

And when you run the report, you should get your report back presented in your template.

Final Report

To read more about creating custom reports, please review the online documentation.

Friday Feb 24, 2012

What do you mean you don't read HDA?

For any WebCenter Content or Records administrator who's done any customizing or troubleshooting of the server has undoubtedly run across an .hda (HDA) file.  A HDA file is proprietary data structure in ASCII text files used by WebCenter Content.  Why HDA and not some other format such as XML? Well, I'll have to leave that argument for the developers as to the benefits of one over the other.  But one thing is clear...while it may be very fast and easy for a computer to parse and read HDA, it's not so easy for humans. Sure, the LocalData section is easy with its name-value pairs, but try reading a result set with 75 attributes and it becomes a bit more difficult. Thanks to the advent of the IsPageDebug=1 option, handling HDA from the server is now easier to read.  But for those files directly on the server, they are still a challenge.

To make it easier to read (and edit) HDA files, Lee Klement, one of our illustrious Senior Principal Instructors in Oracle University, wrote an Excel spreadsheet macro to do just that.  He created it over 10 years ago, but the format has stayed the same so it works just as well as it did the day it came out (for all the old timers out there, you'll see references to Xpedio in there).

HDA Utility

I was recently working with an Oracle consultant on a project when he mentioned the frustration of reading the HDA files coming out of the Archiver and thinking about writing an Excel Macro for reading them. That's when I handed him a copy of Lee's wonderful spreadsheet and made his day. Figuring others out there could benefit from this tool, Lee gave me the OK to share it here.

After opening the spreadsheet, the primary worksheet has instructions on how to open and save the HDA files.   And as with other sample components offered here, it's available as-is.

And we're back...

It's Alive

Well it turns out that there are a few folks out there that follow this blog (thank you!) and it has a bit of history, so I'll be starting it back up again.  I'm still part of the WebCenter A-Team and will be updating the team blog as well, but all of my posts will continue to reside here. 

So now onto some new topics...

Friday Dec 30, 2011

Moving to a different blog

I've recently changed roles within Oracle and am now a Solution Architect within the Oracle's Fusion Middleware Architecture Team (aka A-Team)!  The team I'm joining focuses on the WebCenter suite of products and I will continue to focus on the WebCenter Content line.

Because the team has it's own WebCenter A-Team blog, I'll be writing all of my new posts over there including my latest on metadata autocomplete.  So please stop by and hopefully you'll find some of the great posts the others on the team have written!

Wednesday Dec 21, 2011

Search by extension and Title with a targeted Quick Search

Often when I'm doing a search, I'm doing it based on something in the Title.  But in addition to that, I often know the extension of the original (native) file I'm looking for as well.  I'll know if it's a PowerPoint I'm after...or maybe a zip file. The quickest way for me to do my searching is with the Quick Search in the top right.  So what I've done is created a targeted Quick Search to search by both the extension and the Title.   You can do this either as your own individual quick search or an administrator can set it up as a quick search that all users can use. 

  1. Go to My Content Server -> My Quick Searches.  If you are an administrator, you should be able to create new quick searches defined by admins.

    Quick Search

  2. Click Create New...
  3. If you have the expanded search form enabled, select Search Forms -> Query Builder Form.

    Query Builder Form

  4. Enter a Quick Search Key and Label. 

    Key and Label

  5. In the Query Builder section, click 'show advanced options'. 
  6. In the Query Text box, click 'Modify Query Text and add the following code:

    <$rsMakeFromString('myParms','#s','myParm')$><$loop myParms$><$if myFirst$> <AND> dDocTitle <contains> `<$myParm$>` <$else$><$myFirst=1$>dExtension <starts> `<$myParm$>`<$endif$><$endloop$>

  7. Click Save. 

Now when you do a quick search, you can either select the type of quick search:

select quick search

Or use the key to specify it:

quick search by key

And if you want to search by just the extension, you can leave off the comma and Title parameter.

Wednesday Nov 16, 2011

SQL installation scripts for WebCenter Content 11g

As part of the installation of WebCenter Content 11g (UCM or URM), one of the main functions is to run the Repository Creation Utility (RCU) to establish the database schema and tables.   This is pretty helpful because it runs all the scripts you need to have without having to manually set anything up in the database.  

In UCM 10g and earlier, the installation  itself would establish the database tables if you wanted it to.  Otherwise, the SQL scripts were available to be run independently ahead of time.  For DBAs who wanted to understand what was being done to the database for the application, this was helpful for them.  But in 11g, that is all masked now in RCU.  You don't get to see the scripts at all as part of it's establishing the tables. 

But if you comb through the directories for RCU, you can track them down.  They are in the  /rcuHome/rcu/integration/contentserver11/sql/ directories.  And to understand the order in which they are run, you can open up the /rcuHome/rcu/integration/contentserver11/contentserver11.xml file and see how they are run there.  The order in which they are run are:

  • contentserverrole.sql
  • contentserveruser.sql
  • intradoc.sql
  • workflow.sql
  • formats.sql
  • users.sql
  • default.sql
  • contentprocedures.sql 

If you are installing WebCenter Records (URM), it will run some additional scripts between the formats.sql and users.sql :

  • MetadataSet.sql
  • UIEnhancements.sql
  • RecordsManagement.sql
  • RecordsManagement_default.sql
  • ClassifiedEnhancements.sql
  • ClassifiedEnhancements_default.sql

In addition to the scripts being available within the RCU install directories, they are also available from within the Content Server UI.  If you go to Administration -> DataStoreDesign SQL Generation, this page can allow you to download these various SQL scripts.  


 From here, you can select your particular database type and which components to include.  Several components make changes dynamically to the database when they are enabled, so these scripts give you a way to inspect what is being run during that startup time.  Once selected, click Generate and you now can either view or download the scripts from the Actions menu.

DISCLAIMER:  Installations are ONLY supported when done with the Repository Creation Utility.  These scripts are for reference only and not supported to be run manually.

Tuesday Nov 01, 2011

Displaying a WebCenter Content page in an iframe

If you've tried displaying a WebCenter Content (UCM) 11g page within an iframe of another page, you may have noticed that the iframe display takes over the entire page.  There is logic within the page template to make itself the "top" page.  

I was recently reminded of a configuration flag to disable this effect.  Add this to the Additional Configuration Variables on the General Configuration page of the Admin Server:


Save and restart.  

WebCenter Content in an ifame

Tuesday Oct 25, 2011

Getting a list of Security Groups and Accounts for a user through the API

I got an interesting question on one of my previous posts about how to access the list of Security Groups a user can write to through the API.  In first looking at it, I thought it would be straightforward and there would be a schema service for this.  The one the user tried, GET_SCHEMA_VIEW_FRAGMENT, does indeed return a list of Security Groups, but you can't differentiate between the ones the user can read and which ones they can write to.  I looked through the documentation and couldn't find anything related which might work.  I thought perhaps by running the CHECKIN_NEW_FORM service which renders the check-in page template might offer a resultset to use, but no luck there.

The solution comes from a service buried in the std_services.htm file called GET_USER_PERMISSIONS.  When you run this service as the user, it will return the list of Security Groups and Accounts along with the level of access for that entity (1=read, 3=write, 7=delete, 15=admin).  If you access the service through the URL and add the '&IsPageDebug=1', you can see the results as such:

Get User Permissions

Friday Oct 14, 2011

jQuery DataTables using Excel spreadsheets and Dynamic Converter

On a recent project I worked on, we needed to display a calendar on a site with a list of different events.  From the content owner's perspective, authoring and maintaining this calendar in Microsoft Excel was ideal.  So using Dynamic Converter to convert that to HTML fit the bill.  But they wanted the calendar to be more interactive and dynamic then just a static table. Features such as sorting, searching, pagination and such.  So that's where the DataTables jQuery plug-in makes a perfect solution.  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/freezescript" charset="utf-8"> </script> <script type="text/freezescript" language="freezescript" src="http://datatables.net/release-datatables/media/js/jquery.dataTables.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/freezescript" charset="utf-8"> </script> <script charset="utf-8"> $(document).ready(function() { $("table:contains('TEAM')").attr("id","TeamTable"); $('#TeamTable').prepend($('').append($('#TeamTable tr:first').remove())); $('#TeamTable').attr("class","display"); oTable = $('#TeamTable').dataTable({ 'bJQueryUI': true, 'sPaginationType': 'full_numbers' }) $('#ChangeDivision').appendTo($('#TeamTable_length')); }); function fnFilterType( area ) { oTable.fnFilter( area, 1 ); }</script>

While the default conversion of the Excel document to a HTML table was close, it still needed a bit of manipulation of the table format to fit what DataTables was looking for.  Luckily, jQuery makes that pretty easy to do as well.  

The following are the steps I took to create this conversion.

  1. The first step is to create your Excel document to work from and to check it in.  The first row should be your column headings and the rows below be your data.

  2. Open Internet Explorer and create a new Dynamic Converter  template through Administration -> Dynamic Converter Admin -> Create New Template.  In 11g, for the Template Format, select 'Classic HTML Conversion Template'.  In 10g it should be set as 'GUI Template'
  3. Edit the new template. Be sure to select Classic HTML Conversion Template as the Template Type.

    Note: If you are running Internet Explorer (IE) 8 or newer, you may encounter the error, "Internet Explorer has closed this webpage to help protect your computer.  A malfunctioning or malicious add-on has caused Internet Explorer to close this webpage."   To avoid this error, go to Tools -> Internet Options -> Advanced and uncheck 'Enable memory protection to help mitigate online attacks' near the bottom.  Restart IE and you should be able to bring up the template editor.

  4. Change the preview to point to the document submitted in step 1.
  5. First we'll remove the heading identifying the sheet from Excel.  Click on Element Setup and go to the Styles tab. 
  6. Click New and enter a Name of 'Heading 1'.  For the Associated element, click New and enter a Name of 'Heading 1'.  Click OK and OK.

  7. Go to the Elements tab and double-click on the Heading 1 check mark in the In Body column to change it to a red X.  Click OK.  The sheet heading should now disappear in the preview

  8. Next we'll want to remove all of the formatting to the text.  Click the Formatting button.  Highlight 'Default Paragraph' and for the Font name, Font color, and Font size, choose 'Don't specify'.

  9. Click on the Paragraph tab and for Alignment, choose 'Don't specify'.
  10. Click on the Tables tab and click the Borders and Sizing button.  For Table width and Cell width, choose 'Don't specify'. 

  11. Check the 'Use column headings' box in the Heading section.  Click OK for the Formatting dialog.

  12. Next we need to insert the JavaScript needed to reformat our table into a DataTable. Click on the Globals button and click on the Head tab.
  13. Check the box for 'Include HTML or scripting code in the Head' and insert the code:

    <!-- jQuery-1.4.4.min.js -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript" charset="utf-8">

    <!-- jQuery DataTables -->
    <script type="text/javascript" language="javascript" src="http://datatables.net/release-datatables/media/js/jquery.dataTables.js"></script>

    <!-- Link to the jQuery Demotables Stylesheet      -->
    <link href="http://datatables.net/release-datatables/media/css/demo_table_jui.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            $('#TeamTable').prepend($('<thead></thead>').append($('#TeamTable tr:first').remove()));   

    Let's take a look at this code. 

    The first script tag is used to load the jQuery JavaScript libary.  Here we're loading it from Google's hosted APIs.  The next script tag is used to load the DataTables plug-in.  And the next link tag is loading a sample stylesheet to be used with the DataTables plug-in. In this example, I'm calling out to the hosted files.  You may want to download, check-in, and reference them locally to ensure they are always available.

    Inside the next script tag, the script waits until the page finished loading and begins it's function.  The first line in the function inserts the ID attribute onto the table with a value of 'TeamTable' so that we can easily reference it in the following actions.  In order to identify the table, it looks for the text 'TEAM'.  Adjust this appropriately for the text in your table.

    The next line inserts the <thead> </thead> tags around the heading row in the table.  There is no way to configure Dynamic Converter to insert this, so jQuery helps us do it after the fact.

    The third line applies the class 'display' to the table to utilize the DataTables stylesheet to help format the table.  Again, there isn't a way to insert this class with Dynamic Converter, so jQuery can do it for us.

    And finally, it runs the function to perform the DataTables function to transform the table.  It's using its basic 'zero configuration' settings without any options applied.

  14. Click OK to save the template.  Now use the Template Section Rules to target the appropriate spreadsheets with the new template.

Now when you view the HTML conversion of the spreadsheet, you should see it as a DataTable.  You can do things like sort columns, search, and have pagination.

But now that we have it as a DataTable, we can use the different options it offers to give it a different look and experience.

We can first add an additional JavaScript library and stylesheet from the jQuery UI project.  Edit the template again and modify the code being added to the Head section.

<!-- jquery-ui-1.8.6.custom.min.js -->
<script src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js' type='text/javascript' charset='utf-8'>

<!-- jQuery smoothness -->
<link href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/smoothness/jquery-ui.css' type='text/css' rel='stylesheet' />

Then we can add some additional options to the DataTable:

oTable = $('#TeamTable').dataTable({
                'bJQueryUI': true,
                'sPaginationType': 'full_numbers'

So the bjQueryUI will use the UI library we included above.  And the pagination will show page numbers instead of just arrows.

Then we'll add an option list to do filtering on the table.  Add this line within the $(document).ready(function():


Then add an additional function to call when the option list changes:

 function fnFilterType( area )
        oTable.fnFilter( area, 1 );

Finally, we'll add the HTML option list to the page.  Click on the HTML tab and add this code in the 'Include HTML or scripting code before the content'. 

<span id="ChangeDivision"><br />
<span class="style6">Show</span> <select onchange="fnFilterType (value)" name="Division">
<option value="" selected="selected">All types</option>
<option value="NFC">only NFC</option>
<option value="AFC">only AFC</option>

When you make these additional additions to the editor, it will complain about a runtime error on the page.  This only occurs in the preview window and can be ignored. 

Now we have our updated DataTable:

You can download the completed GUI template for 11g here. The 10g version is here.  If using 11g, be sure to submit it as a "Classic  HTML Conversion Template" and as a "GUI Template" in 10g.  

Special thanks to Paul Thaden for the code on this example!

Tuesday Oct 04, 2011

Alphabetized Menus in UCM 11g

For those that may not be following the guys over at Redstone Content Solutions and their corecontentonly.com blog, they just released an updated 11g version of their Alphabetized menu component.  I got so used to using it in UCM 10g, it was hard to transition back to the standard menus in 11g!  

If you miss the 10g version or are new to WebCenter Content 11g, I'd highly recommend it.


Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/


« July 2016