Archive

Archive for the ‘OracleUCM’ Category

Announcing Redstone Content Solutions!

July 21, 2009 Jason Stortz Comments off

Announcing: Redstone Content Solutions

I have been working with my business partner, John Klein, to form a new Advanced Training & Consulting company focused on Oracle products. We work specifically in the Enterprise 2.0 landscape. Please visit our new website to learn more about us and our services. Please feel free to contact us at any time for answers to your questions.

As one might imagine, starting a new company can be a bit of an adventurous undertaking. I wanted to take a moment to thank the various people who offered so much help and advice. So as to protect the innocent, we will not get into names, however, you all know who you are. Thank you so much for reviewing our content, tearing apart the website and answering way too many questions about running a business, accounting, insurance and legal advice.

Press Release: Open For Business

The Blog

The presence of and my involvement and commitment to Redstone Content Solutions will have no negative effect on Core Content Only. I intend to continue posting code samples and giving away free components as time permits. In fact, the possibility of MORE posting and samples is very real as time may actually be more available now that we have opened Redstone Content Solutions.

Belated Anniversary

Nearly one year ago, on July 14th, 2008, I released the first post for Core Content Only. One full, eventful year later I want thank you for visiting my corner of the internet and I appreciate all the feedback presented by my various visitors. I hope you have found the last year as rewarding as I have.

One year has presented 104 posts or approximately 8.6 posts per month as well as 14 free downloadable examples/components. This is a little below my posting target of 10 posts a month while still satisfying my "freebie quota" of one new download per month.

One of the most interesting parts of any public endeavor is monitoring the statistics. The first couple of months were a little slow and it was fun to see the visits and page views spike whenever the blog was mentioned in another public space. Visits and page views have fairly consistently grown by about 10% each month. The download page gets the most traffic by far.

Categories: OracleUCM

Search UCM (Stellent) With Groovy

July 9, 2009 Jason Stortz Comments off

In a previous article we talked about using Groovy to execute the PING_SERVER service of our SOA enabled Content Server. Interesting, but fairly useless you might say. Let's see how we can conduct a search using Groovy and then access specific metadata from those search results.

You may want to keep the RIDC JavaDoc link handy as you explore Groovy Integration further.

First, the script, and then some discussion.

The Script

// Import needed classes from Remote Intradoc Jarimport oracle.stellent.ridc.IdcClientManagerimport oracle.stellent.ridc.IdcContext
 
// Create the client for request/response, connect directly to serverclient = (new IdcClientManager()).createClient("idc://localhost:4444")
 
// Create a user/security contextuserContext = new IdcContext("sysadmin", "idc")
 
// Setup the request, search for two pieces of contentreq = client.createBinder()req.putLocal("IdcService", "GET_SEARCH_RESULTS")req.putLocal("QueryText", "")req.putLocal("ResultCount", "2")
 
// Get the responseresp = client.sendRequest(userContext, req).getResponseAsBinder()
 
// Dump out the local data of the responseprintln "LocalData:" resp.getLocalData().keySet().each{ println " $it = ${resp.getLocalData().get(it)}"}
 
// Dump out the names of the resultsets in the responseprintln "\nResultSets:"resp.getResultSetNames().each{ println " $it"}
 
// Dump out dDocTitle for each piece of content in the responseprintln "\nTitles:"rsSearchResults = resp.getResultSet("SearchResults")rsSearchResults.getRows().each{ println " ${it.get('dDocTitle')}"}
 
// Wrap it up!println "\nDone"
 

Closures

The above script makes extensive use of a language feature in Groovy known as a closure. Closures are not specific to Groovy and they are certainly not a new concept. They are found in many other programming languages. One such language you may be very familiar with is JavaScript!

In this particular case we are using the "each" closure function. Here is an excerpt from the sample script:

println "LocalData:"resp.getLocalData().keySet().each{ println " $it = ${resp.getLocalData().get(it)}"}
 

See that "each" statement in the second line? The word each followed by curly brackets forges the wrapping closure and the code inside is what becomes executed when the closure is invoked. In this case, our closure is invoked for each key in the Key Set of the Local Data collection. Within the closure you can use the "it" variable (as in iterator) to access each key.

If you have something against the name "it" for the variable you can alter the variable name. As an example, let's change the syntax so the variable will be named "key", try this:

println "LocalData:"resp.getLocalData().keySet().each{ key -> println " $key = ${resp.getLocalData().get(key)}"} 
 

This is also very helpful when using a closure within a closure. An example? Sure. What if you wanted to loop the resultsets and print the value for each column for each row of each resultset? You're code might use nested closures and look something like this:

resp.getResultSetNames().each{ println "\nResult Set '$it':" resp.getResultSet(it).getRows().each { row ->  resp.getResultSet(it).getFields().each {  field ->  println "\t${field.getName()} = ${row.get(field.getName())}" } } print("\t----------------")}
 

Additional Sample Scripts

Here are two additional Groovy Scripts you can download and try out:

Search & Target Title, and Search & List Result Sets

Categories: OracleUCM Tags:

Get Groovy With UCM (Stellent)

June 11, 2009 Jason Stortz Comments off

Yet another way to work with UCM? You bet! But this one is super Groovy (sorry, I had to do that). Check out how to setup Groovy and the Remote Intradoc Client to integrate with the Oracle Fusion Enterprise Content Management platform. You know you want to!

I really like the Remote Intradoc Client (RIDC). RIDC allows me to control UCM (Stellent) from a Java based application (Console, JSP, Servlet, etc.). What was that? Sounds similar to Content Integration Suite (CIS) you say? Yes, so far it does. RIDC is a thinner, light weight framework for those already familiar with UCM services. RIDC has very few of those "helper methods" that would guide you through the intelli-sense embedded in your IDE. However, for those familiar with services or willing to research them RIDC will offer tremendous capacity with little effort.

You can get RIDC as part of the CIS download from here. Within the CIS download is a folder containing the jar files and documentation needed to get up to speed on RIDC. This is not a deep dive on RIDC itself, but more of a sampling of how I use it to integrate/control UCM. Bex Huff has a similar article using Jython with RIDC. There is always more than one way to skin a cat.

I make use of RIDC via Groovy. Side Note: Groovy is built in with ADF 11g and Oracle uptake on Groovy will go even deeper in the future.

Important Groovy Links

  • Download – As of this writing the latest version of Groovy was 1.6.3.
  • Documentation – (Tons of examples!)
  • Getting Started – Discusses configuration of the JDK and variables like JAVA_HOME

Pure Groovy Examples

Sample #1 – Hello World

println "Hello, World!"

Sample #2 – JSON Like Syntax Possibilities

scores = [ "Brett":100, "Pete":"Did not finish" ]
println scores["Pete"]
println scores.Pete

Groovy UCM Sample

How about we start with a very simple example? We will use Groovy to Ping the Content Server. Start by opening the Groovy Console application. From there I need to use the "Script" menu to add a reference to the RIDC JAR file. At this point the environment is pretty well ready to go and we can start writing code in the console to be executed. To execute the code you can use CTRL-R, and to clear the output window you can use CTRL-W.

Using RIDC is easiest when we are familiar with the services calls, the parameters to send the calls, and what to expect in the response from the calls. If you set your profile to Top Menus so you can see the URL you will be able to look at the variables passed around to service calls as you surf through content server. You could also use a tool like Fiddler or another HTTP proxy/sniffer to spy on the parameters being swapped with content server by your browser.

Use the "Script" menu to add JARs.

Use script menu to add jars

Add the RIDC JAR specifically.

Add the RIDC JAR

As an example, when I execute this url:

http://localhost/idc/idcplg?IdcService=PING_SERVER&IsJava=1

I get back a response like this one below, which I can then use RIDC/Groovy to access the response data.

<?hda version="10.1.3.4.1 (090528)" jcharset=UTF8 encoding=utf-8?>
@Properties LocalData
dUser=sysadmin
blFieldTypes=StatusMessage message
refreshSubMonikers=
StatusMessage=You are logged in as 'sysadmin'.
blDateFormat=M/d/yy {h:mm[:ss] {aa}[zzz]}!mAM,PM!tAmerica/Chicago
XmlEncodingMode=Full
changedSubjects=
refreshSubjects=
refreshMonikers=
changedMonikers=
IdcService=PING_SERVER
IsJava=1
@end

Armed with this request/response knowledge, we can create a Groovy script using RIDC like this:

// Import needed classes from Remote Intradoc Client Jar
import oracle.stellent.ridc.IdcClientManager
import oracle.stellent.ridc.IdcContext

// Create the client for request/response
client = (new IdcClientManager()).createClient("idc://localhost:4444")

// Create a user/security context, don't need a as we're connecting
// directly to ucm and we're a trusted ip
userContext = new IdcContext("sysadmin")

// Setup the request
req = client.createBinder()
req.putLocal("IdcService", "PING_SERVER")

// Get the response
resp = client.sendRequest(userContext, req).getResponseAsBinder()

// Use the response, should say "Response: you are logged in as 'sysadmin'"
println "Response: ${resp.getLocal("StatusMessage")}"

// Wrap it up!
println "Done"

Here's what this looks like run in Groovy Console:

PING_SERVER run in Groovy

You may need to add your ip address to the IP Address Filter of content server for this script to run (as it is written). You can also use a user name and password with RIDC. This is covered in the documentation.

Download the Sample PingServer.groovy Script.

Categories: OracleUCM Tags:

Link To a Specific PDF Page

June 9, 2009 Jason Stortz Comments off

Sometimes I need to send someone to the documentation. Now and then it will be easier to tell them, "Hey, check out page 10 of the iDocScript guide!" This can easily accomplished by tagging #page= onto the end of the PDF URL.

As an example, check out page 30 of the "Using Components" PDF:

http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/using_components_10en.pdf#page=30

Send users directly to a certain page makes the process much easier for them.

Categories: OracleUCM

Manually Disable Component

June 1, 2009 Jason Stortz Comments off

It is very easy to disable a Stellent component manually. Sometimes when you install a new component you may find something is wrong and the server does not restart. Other times you might be developing the component yourself and the server again fails to restart. On a variety of occasions you will not even be able to fire up Component Wizard. This process also comes in handy when content server is installed on a remote machine and you do not have access to be able to pull up component wizard.

That is where this trick comes in. Find this file: /config/components.hda

Remove the name and location entries for the component causing the issue. I suggest storing those strings somewhere else, perhaps another text file?

Now attempt to restart your content server and all should be right with the world once again.

Categories: OracleUCM

Hide Standard Profile Menus

May 29, 2009 Jason Stortz Comments off

Content Profiles allow administrators to craft custom check-in and search screens. They can perform all sorts of default metadata tips and tricks and generally craft targeted, context centric pages that help users properly apply metadata to their content.

On occasion I have been asked about how to hide the Standard Check-In and Search menus once Content Profiles have been enabled. This post explains how to construct a component to accomplish this task. You can also download this Sample Component to Hide Standard Profile Menus.

When you install this component it will prompt you for four (4) preference variables. These variables (2 for each menu) indicate if the functionality is currently enabled and what iDocScript should be executed to determine if the menu item should show or not. The default settings hide the menu from anyone without the admin role.

Categories: OracleUCM Tags:

Force Security Group Choice (Stellent)

May 28, 2009 Jason Stortz Comments off

Similar to the article on forcing users to select a Content Type (dDocType) there is a setting that forces the selection of a security group.

ForceSecurityGroupChoice=true

This setting adds a new blank list item for Security Group and sets this new blank list item as the default selection thereby requiring the user to select a Security Group.

Place this setting in <install_dir>/config/config.cfg

Or, put this setting in place in the General Configuration section of the Admin Server.

Categories: OracleUCM

Force Doc Type Selection (Stellent)

May 22, 2009 Jason Stortz Comments off

By default, when the check-in page loads up the Content Type select list automatically sets itself to the first item in the list. Sometimes this can cause problems if users do not pay attention, get lazy, etc. On occasion it will be desirable to force the selection of a Content Type (dDocType). Through the admin server go to general configuration and add this setting:

ForceDocTypeChoice=1

Restart content server and you should be all set. Now when you visit a check-in page they Content Type will not be preset and users will be forced to make a selection from the list.

Categories: OracleUCM

Adding Fields to Quick Search

April 23, 2009 Jason Stortz Comments off

The Quick Search box in Oracle Fusion ECM (Stellent) will search Content ID, Title and the full text of content by default. To change the fields this functionality uses you will need to add two configuration variables: QuickSearchFields & QuickSearchOperators.

For example, say you wanted to make the quick search use the default fields AND the comments field. Through the Admin Server then General Configuration add the following (then restart and try it out):

QuickSearchFields=dDocName|dDocTitle|dDocFullText|xComments
QuickSearchOperators=hasAsSubstring,hasAsSubstring,fullText,hasAsSubstring

Possible values for Quick Search Operators:

equals
hasAsSubstring
beginsWith
endsWith
hasAsWord
fullText
dateGreater
dateGE
dateEquals
dateLE
dateLess
numberGreater
numberGE
numberEquals
numberLE
numberLess
zoneHasAsWord
zoneHasAsWordPrefix

Categories: OracleUCM

Lost Sysadmin Password for Oracle Fusion ECM (Stellent)?

April 21, 2009 Jason Stortz Comments off

Did you forget your sysadmin password for your Oracle Fusion ECM (Stellent) Content Server?!

There are those rare occasions where you might not know the sysadmin password for your Content Server. The reasons for this are many and varied and certainly not limited to forgetting the password or the departure of your administrator who was the "keeper of the key".

What can you do now?

  1. Stop all Content Server services/processes including main, admin and inbound refinery services/processes
  2. Stop the Web Server (Apache, IIS, etc.)
  3. Find this file: -content server install directory-/data/users/SecurityInfo.hda
  4. Rename that file to something else so you can keep it, like SecurityInfo.hda.bak
  5. Open your Content Server database (perhaps with SQL Management Studio for SQL Server or SQL Developer for Oracle)
  6. Find the record in the Users table where dName equals sysadmin
  7. Remove the value for dPasswordEncoding for that record
  8. For that same record set the value for the dPassword column to a temporary password
  9. Commit your database changes
  10. Start the Content Server services
  11. Start the User Admin standalone application, not from the admin applets page
  12. Use your new password to login when prompted
  13. Find the sysadmin user and update the password to your new long term password
  14. Close the User Admin application
  15. Start the Content Server Web Server
  16. Enjoy!
Categories: OracleUCM