Fast Workflow Debugging
When you are developing and testing workflows in UCM the Update Event of a step in a workflow can be your worst enemy. The update event is fired off roughly every sixty minutes in a standard configuration of UCM. Any IdocScript you create in your Update event of your step then might have to wait as much as sixty minutes to execute. This makes testing these scripts difficult. Sure, in some cases you can use the built in test harness. However, this little configuration will be a big boost:
DoDebugFastScheduledEvents=true
Adding this configuration variable to you <install>/config/config.cfg or through the Admin Server under General Configuration and restarting your content server will give you a big development/test boost. This reduced the period from sixty minutes to five minutes.
Happy workflow debugging!
Suppressing Alternate File
If you want to hide the alternate file on the check-in page you can add the following configuration to your <install>/config/config.cfg file. You can also add this to the General Configuration Variables in the Admin Server. Both of these methods will require a restart. This will hide alternate file globally. And what is the setting? It looks like this:
suppressAlternateFile=1
What if you would like to do this for a certain profile, but not globally? No problem. Simply select one of your rules for your profile. Enable the activation conditions and add this setting as a side effect:
<$suppressAlternateFile=1$>
How I Use Oracle UCM in the Cloud
I wanted to talk a little about how we take advantage of Amazon Web Services, especially the Elastic Compute Cloud, here at Redstone Content Solutions. This is not marketing drivel. The goal is to describe how you can benefit from the cloud for your Oracle endeavors by describing how we actually do just that ourselves. Sometimes it helps to just hear about how others are using something.
We use the Amazon Elastic Compute Cloud, sometimes referred to as Amazon EC2, for a variety of purposes. The topics for this post will be the use of EC2 for Development and Training. I will release a post in the future with additional thoughts about using EC2 to host your Production environment.
For those who are attending COLLABORATE10 at Las Vegas’ Mandalay Bay Hotel & Convention Center April 18-22, I will be giving a presentation on this subject. The session, entitled Build your own UCM Stellent Instance in Amazon EC2, will be held on Thursday, April 22nd, 2010 at 8:30 a.m. in Room 2. The session ID is 128. Session dates and times are subject to change, so stay tuned!
We actually do use EC2 to host development and training environments. I interact with EC2 environments on a daily basis. The primary thing you need to take advantage of EC2 for these purposes is a reliable internet connection. Note: I will be discussing mostly Oracle Content Management – based environments but we also use them for Web Center Framework and SOA Suite.
Originally when we started using EC2, machines had to be kept running. If you restarted an instance you lost your “state” if you did not re-bundle the instance and persist it as an Amazon Machine Instance (AMI). There were a few tricks we could use to avoid this to a certain extent that revolved around attached storage. Additionally, images we created ourselves had an image size cap. This proved to make things difficult as we tried to construct base images within the 10 gigabyte range.
With some recent announcements in December by Amazon the above restrictions are now a thing of the past. We can launch instances, change data, shut down and launch again with no loss of state or data. It actually acts like a real piece of hardware now. With this new functionality, we can boot images directly off of Elastic Block Storage (also known as EBS). This means when we shut our instance down, the resources required to run the instance are not reclaimed. The resources (namely disk) are kept in our EBS volumes and their data persists across shutdowns. Now when we launch our instances the resources are already allotted and immediately available. Hence, our boot times for launching instances are much faster. If you’ve ever tried to launch an EC2 instance you know why I am excited about this.
EC2 also works with Amazon Simple Storage Service (S3) which is different from EBS. Think of EBS as blocks of space you can attach as volumes to machines. Amazon S3 acts like your corporate SAN where you can store all kinds of information. Whenever you transfer something from your own machine or elsewhere in the world to an EC2 instance or S3 Amazon will charge you. However, Amazon does not charge to move data from S3 to any of your EC2 instances. So, we store installers, patch sets, etc., in S3 and then we copy those to our EC2 instances. You just have to get your content into the Amazon cloud and then you can move it around within the cloud for free.
You can work with a variety of operating systems in EC2. You can use Windows Server 2003 or 2008 and many flavors of Linux. There is even a process you can go through to convert VMWare Workstation files to an Amazon Machine Instance that you can upload and run in the cloud. Since we work exclusively with Oracle products, we use Oracle Enterprise Linux (OEL) extensively. There are several AMI instances available, pre-built, from Oracle for Oracle Enterprise Linux and Oracle Database 11g that might serve as a good starting point. Or, you can really get into it and start using a Just Enough Operating System (JeOS) version of OEL.
We can setup an instance of OEL, Oracle Database 11g R2, Oracle UCM 10gR3 and get everything configured just right. Then we can spawn as many “instances” of this as we want for training, testing or demonstration purposes. We can choose to accept a single processor box with 2 gigabytes of RAM, or we can throw the “big iron” on and fire up with 8 processors and 16 gigabytes of RAM or pretty much anything in between.
Think about this scenario. You want to try out Digital Asset Management on Content Server. Specifically Video Manager. You can acquire an EC2 instance with all the power you need to run Flip Factory within minutes. Flip Factory is a neat piece of software but the processing requirements to really use it are pretty steep. Most development groups I know do not have that kind of horse power just lying around waiting to be used. With EC2, you can have it running by lunch time. We use this kind of quick hardware acquisition to provision testing environments or “component labs” frequently.
Finally, the nice thing about all this is accessibility. We can quickly and easily open this up for a client or prospect to view a test instance. We can even spawn a separate instance of the original for the client to “play around on”. But what if they do something we hadn’t accounted for? Drop that instance and re-spawn a new one and they’re back in action fifteen-twenty minutes later.
In the future, I am going to try to cover more specific details about the actual setup, the problems we encounter and how to solve them. I will also detail a handy array of tools we use to work with Amazon Web Services (AWS). Some of this will be on display if you see my presentation in Vegas!
Just food for thought. Think about it some. The opportunities are endless.
jQuery Post With HDA Payload
In a previous post I covered some examples of using jQuery with Content Server as well as a component to help facilitate testing out some of this functionality. Dan Kozlowski asked in the comments and over here on the Oracle ECM Forums about how he might use jQuery when the INPUT has HDA ResultSet data. He gives the following example:
Properties LocalData
IdcService=EDIT_USER
dName=jsmith
dFullName=Jennifer Smith
dUserAuthType=Local
dPassword=password
dEmail=jsmith@stellent.com
dUserType=MKT
dUserLocale=English-US
@end
@ResultSet UserAttribInfo
2
dUserName
AttributeInfo
jsmith
role,admin,15,role,contributor,15
@end
There are two magical parts to get this to work. First, you need to set the REQUEST (not response) content type. Second, your payload has to be in a certain format. Let’s look at each of these in turn.
First, here’s a sneak peek of the jQuery AJAX request:
$.ajax(
{
type: "POST"
, contentType: "text/hda; charset=utf-8"
, url: ""
, data: jQuery("#txtData").html()
, success: function(msg)
{
alert(msg);
}
, error: function(msg)
{
alert("Error: " + msg);
}
});
Notice the contentType setting!
Now, the payload, specified by the variable named data, has to be in a certain format. This format should start with IsJava=1 and be followed by the encoding and finally the first ResultSet known as LocalData. LocalData will contain the IdcService to be called, and a variety of over key/value pairs. At the end of that set we can include additional necessary ResultSets.
I have added an Edit User Sample HCSP zip to the Downloads page. Check this HCSP into your content server, go to Doc Info and click the web viewable link. The page will load with a text area and a button. Adjust the data in the text area and click submit!
Play around with it some and you should see how this all works together!
Dan, thanks for what turned out to be a fun puzzle.
Good Forum Discussion on Accounts
There has been some good discussion going on over on the Oracle ECM Forums regarding Accounts. It started out as Accounts and Access Control Lists but it has morphed a little into some discussion about how to use Accounts in general and some possible structures people are using to layout their account hierarchies.
Check out these discussions about accounts in the Oracle ECM Forums:
http://forums.oracle.com/forums/thread.jspa?threadID=1001039&tstart=0
Output to Log
One of the easiest ways to see what might be going wrong, or right, in Content Server is the use of trace sections on the System Audit page. Trace sections allow you a great variety of control over what kind of information shows up in the server output.
See this former blog entry for more detailed information about tracing:
Content Server Tracing and Creating Your Own Custom Trace Sections
Refreshing the Server Output to show you what is going on can get annoying though. If you add this entry to General Configuration or config.cfg and restart you can get server output to be written to disk:
UseRedirectedOutput=true
To find the log on the disk look under the directory that is appropriate for your Operating System.
Windows: <install dir>/bin/IdcServerNT.log
Linux: <install dir>/etc/log
Now that you have found the log, it would be easier to keep an eye on what’s going on by using something like the tail command in Linux/UNIX. The tail command, with the -f switch will continuously show the data being added to the log file. In Linux you simply use this command:
tail -f /etc/log
There are several applications available that add similar functionality for windows:
http://tailforwin32.sourceforge.net/
http://www.baremetalsoft.com/baretail/index.php
http://www.withdata.com/tail4win.html
Assign Info Button at the Top
When contributing various assets in Site Studio Designer the Assign Info form will be presented. By default, the buttons to commit are at the bottom of the screen. This is not such an issue the first time I save/commit the content. However, as I continue editing/saving the content I get annoyed by the fact that I have to scroll to the bottom of the page and click Assign Info each time.
I have finally broke down and created a new component that adds the Assign Info button to the top of the page as well.
Download the sample component from the Downloads page.

Web URL Map Extras
Grab the Web URL Map Extras Component at the Downloads page.
In my Oracle OpenWorld 2009 demo I showed how to use the Web URL Map feature of Content Server to make images and renditions easier to use in Cascading Style Sheets. This post is about that topic and one of the components I demonstrated during that session.
One way to make referencing images (and especially renditions) in Cascading Style Sheets and other places in your web sites is to use the Web URL Mapping tool that comes with Content Server. Check out Kyle’s blog, he has a whole post about this feature.
I have several of these mappings that I always like to add to a server. So, I made a component that will add these mappings to the server when you install the component. Also, I wanted an example component showing how you can read from a defined map and add it to another map. Hence, the WebMapUrlExtras component was born and is available here.
WebMapUrlExtras adds the following four mappings.
w/
pass in a dDocName and get back the web rendition of an image
n/
pass in a dDocName and get back the native file
qs/
pass in a query string and get back the quick search results
r/
pass in a dDocName and get back the web rendition, or you can optionally specify the rendition by tagging on a ?Rendtion=<rendition name>
Prior to the component your Web Map URL configuration might look like this:
After installing the component and restarting it should look similar to this:
Web Sites Menu Filtering
I am starting to release some of the example components demonstrated at my session this year at Oracle OpenWorld 2009. In the demo I briefly showed the Web Sites menu and talked about filtering the sites in this menu based on UCM Roles. This component demonstrates how one might accomplish such a task. As other articles related to my session come on line I will inter-link them together.
You know that Web Sites menu Site Studio adds to Content Server? Can I limit the links in that list somehow? This question is asked fairly regularly. I wanted to get a sample of how one might accomplish just that out for general consumption. Once you see an example accomplishing the filtering of that list you’ll be able to apply your own specific business logic as well.
In this example we’re going to use Roles to control what web sites are listed in the menu for any given user. I’ve seen this list controlled by Roles, Accounts, Custom User Metadata and every combination of those aspects and more. This is a LOT less about securing sites away from the users (as it doesn’t do that AT ALL) and more about thinning the sites list to something more context appropriate for individuals attempting to do their everyday job.
How to do this? Override the custom_finish_layout_init dynamic html include. Here’s the important snippet (don’t worry, there is an example component!):
<$c=" STARTING EDIT HERE, JS"$>
<$if UserIsAdmin OR userHasRole("SSMENU" & siteId)$>
navBuilder.addChildNodeTo('SS_DISPLAY_WEBSITES'
, 'item'
, 'id==SS_WEBSITE_<$n$>'
, 'label==<$js(label)$>'
, 'url==<$js(siteRef)$>'
, 'icon==WebItem.gif');
<$endif$>
<$c=" ENDING EDIT HERE, JS"$>
So, sysadmin has the admin role, so s/he can see our three site samples in the web sites list:

Now, pretend we’ve created a new user named SingleSiteGuy (stay on task here, this is not a dating site side story…). We’ll give SingleSiteGuy our new SSMENUPayPalDemo Role.

And TA DA! Now SingleSiteGuy can only see the menu we gave him a role to access.

Grab the Websites Menu Filter Sample Component.
ORA-01658 Unable to create initial extent for segment in tablespace
The other day I was using an Oracle database tablespace supplied by a dba for a development environment and when I went to rebuild the full text index the Repository Manager greeted me with this nifty little error:
ORA-01658: unable to create initial extent for segment in tablespace
Fun huh?

Ok, this is a development box, lots of space. I thought this was all setup to expand on need, but let's check it out. First, we need to go to the database via something like Toad, SQL Developer or JDeveloper and execute a Query similar to this one:
select file_name, bytes, autoextensible, maxbytes from dba_data_files where tablespace_name='DEVWCM_SYSTEM';
You're tablespace name will vary, BUT REMEMBER: the value you supply for tablespace name is case sensitive
Running this query I find out that autoextend is NOT turned on, and further exploration yields a maxed out datafile. Fine, let's get autoextend turned ON. Here's two samples:
alter database datafile
'C:\Oracle\app\oradata\orcl\DEVWCM_SYSTEM.DBF'
autoextend on;
alter database datafile 'C:\Oracle\app\oradata\orcl\DEVWCM_SYSTEM.DBF'
autoextend on next 100m maxsize 2000m;
In the first case we're going to simply turn on autoextend and let it ride. In case number two you can see some extra instructions including how much to extend and a limit.

And did this take care of the problem? Yep. Sweet, a fresh, clean, working index.



