Archive

Archive for the ‘OracleUCM’ Category

Workflow Email Notifications

January 14, 2011 2 comments

Changing the From Address

If you want to change the from address on a workflow email notification the following line of code will allow you to change it. You must set emailFromAddress before you use wfNotify. For example, in the entry event for a workflow, you can use this code to change the from address on email notifications.

<$emailFromAddresss=”records_management@mydomain.com”$>

Custom Email Notifications

Ever needed to notify a user that a docoument has been released and is ready for viewing? The following code can be used to do just that. It can also be easily adapted for other situations.

For example, in the exit event of your workflow step, use the following custom Idoc Script code:

<$wfMailSubject=”File <$dDocName$> has been released”$>

<$wfNotify(dDocAuthor, “user”, “WORKFLOW_RELEASED_NOTIFICATION”)$>

The first line of Idoc Script uses the wfMailSubject variable.

From the Idoc Script Reference guide:

wfMailSubject defines the subject line of a workflow e-mail notification.If no subject line is specified, the e-mail will use the default subject for the type of notification (review, reject, or workflow started). Idoc Script can be included in the subject string.

The second line of Idoc Script uses the wfNotify workflow function:

wfNotify sends an e-mail message to a specified user, alias, or workflow token.

wfNotify takes two parameters and an optional third parameter:

■ The first parameter specifies the user name, alias, or token to be notified.

■ The second parameter indicates the type, either user, alias or token.

■ The optional third parameter specifies the name of the e-mail template to use for constructing the message. (See theIdcHomeDir/resources/core/templates/templates.hda file for template definitions.)

As you can see above, I have used a custom Workflow template which I created and bundled with my component. You can download the sample template here.

Below is a picture of what an email looks like using this sample template.

Disabling Workflow Review Email Notifications

If you or your RMA admin decide not to receive email notifications when an item is ready to be reviewed, the following code will suppress this email notification. In the entry event of a workflow put the following Idoc Script:

<$wfSet(“wfJumpEntryNotifyOff”, “1″)$>

Categories: OracleUCM

TNS:listener does not currently know of SID given in connect descriptor – Error Message of the Month (January)

January 7, 2011 1 comment

We decided to start something new here at Core Content Only. Each month we will review a UCM error and share how to solve it. Error messages are a part of a developer’s life. They can be very helpful when they make sense. Sadly, sometimes the error messages do not always make the most sense. We are going to showcase errors we have found when coding and how we solved them. We hope this will help you in your development work.

Failed to initialize the server. Unable to initialize the system provider ‘SystemDatabase’. Unable to create database connection for the database ‘SystemDatabase’ with connection string ‘jdbc:oracle:thin:@localhost:1521:orcl’. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orclUnable to create database connection for the database ‘SystemDatabase’ with connection string ‘jdbc:oracle:thin:@localhost:1521:orcl’. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orcljava.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orcl [ Details ]

We do most of our development work in Windows virtual machines. This particular VM has been in use for quite some time. This error message stops UCM from starting. This error message has to do with the (Oracle) database not being available. You will need Administrative rights to be able to complete this task.

Step 1 – Check the DB listener status

lsnrctl status

Notice that the listener you want (in our case “orcl”) is not showing.

Step 2 – Login via sqlplus

sqlplus sys/oracle as sysdba

Sqlplus gave us this error message:

Writing audit records to Windows Event Log failed

Step 3 – Go into the Windows Event Viewer (eventvwr.exe)

Under “Windows Logs”, right click on Application and select “Clear Log”. Do the same for System.

It may also be wise to right click on Application and select Properties. Then, under “Log Size” select the following option under “When maximum log size is reached”: “Overwrite events as needed”. This should prevent the log from maxing out and causing the DB not to start.

In Windows Vista and higher, you can execute the following command to clear the Application log:

wevtutil cl Application

Step 4 – Login via sqlplus

sqlplus sys/oracle as sysdba

You should now be able to login with no error messages.

Step 5 - Check the DB listener status

lsnrctl status

You should now see your listener running.

Step 6 – Start UCM

UCM should now start up.

Note: If you’ve got a UCM error you want us to review, send it to errors at corecontentonly.com.

Including Static Files Within A Custom Component

January 5, 2011 Comments off

Recently a forum post came up asking how to include files along with a custom component. This is a fairly simple process.

You need not checkin the files to content server. Instead, put the files you want to include with your component here:

server/weblayout/resources/MyComponentName/

Then in Component Wizard -> Build Settings, add a “Weblayout” entry type and link to the above path.

To use your content, you can use the following Idoc Script code to include a JavaScript file:

<script type="text/JavaScript" src="<$HttpRelativeWebRoot$>resources/MyComponentName/jquery.js"></script>

And that’s it! It is that simple. Included files can be anything ranging from JavaScript (think jQuery) to images to CSS.

Categories: OracleUCM

JDeveloper Ant Magic

January 3, 2011 2 comments

I use JDeveloper as my daily IDE. When developing custom 10gR3 UCM Java components, you must restart content server between each and every build. So even if you make the smallest change, you still need to restart content server. This means I have a whole tab dedicated to the “Start/Stop Content Server” page in Admin Server.

With some magic from Ant (an Apache Java library and command-line tool that helps compile, assemble, test and run Java applications) we can automate the process of building our code and restarting UCM (on a Windows development environment) all with one simple keystroke.

To get started, in JDeveloper select File – > New Gallery. On the left select Ant (under General) – > Buildfile from Project. Click OK.

On the next screen, the defaults should be fine. I called my file name: build.xml and checked “Make This the Project Buildfile”. Click OK.

A new window will open which will be displaying an XML file. Part way through the file, you fill find a line that reads similar to:

<target name=”all” description=”Build the project” depends=”compile,copy”/>

You should change this line to read as follows:

<target name=”all” description=”Build the project” depends=”compile,copy,restartUCM”/>

Then below the very last closing target tag (right before the closing project tag), add the following code:

<target name=”restartUCM”>
<exec executable=”net”>
<arg value=”stop”/>
<arg value=”IDC Content Service ecm”/>
</exec>
<exec executable=”net”>
<arg value=”start”/>
<arg value=”IDC Content Service ecm”/>
</exec>
</target>

Make sure to replace ecm above with the name of your UCM server. Now you may save the build.xml file.

And that is it. Now, instead of building our code using CTRL + F9 we can use the following keystroke: CTRL + ALT + SHIFT + F9. This executes our Ant script which in turn compiles our code and then restarts UCM.

Note: This will only work for UCM versions older than 11g and on a Windows server. 11g is built on top of WebLogic, and thus the Ant script would need to restart the actual WebLogic server domain instead of a Windows service. If you are not using Windows, you can do some similar logic using the “service” command in Linux.

Categories: OracleUCM Tags: , , , , ,

Bundle Components in One Easy to Install Zip

December 17, 2010 Comments off
This post describes how to package additional components with a component (like Folders_g) as well as a nifty trick to help you avoid the step of copying your sub-components to the master component each time.
1. Launch Component Wizard
2. Open your main component
3. From the menu, select Build, then Build Settings
4. Click Advanced
5. Scroll to the bottom until you find Additional Components.

6. In this box, you will need to enter something as follows:
<component_name>:<component.zip>:<preference_data>
If you do not need preference data, simply leave that part out but make sure the final “:” is there. An example is shown in the image above.
7. Click OK

This next part will use symbolic links. If you wish not to use symbolic links, skip down to the Windows XP/Server 2003 or Linux section. If you are using Windows XP/Server 2003 or lower, you cannot take advantage of symbolic links. Skip down to the Windows XP/Server 2003 section. If you are using Linux you may skip to the Linux section below.

Windows Vista and higher

Since Windows Vista, Microsoft has included symbolic links in its Operating System. Those who are familiar with Linux probably already know what these are. For the rest of us, Wikipedia defines a symbolic link as a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links operate transparently for most operations: programs which read or write to files named by a symbolic link will behave as if operating directly on the target file.

The benefit to using symbolics links is we can continue to build components in their own directory. We simply drop a symbolic link to the zip file in our main component and it will bundle the zip as if it were actually within our main component folder.

A very handy Windows Explorer shell extension called Link Shell Extension has been developed by Hermann Schinagl. You can download both x86 and x64 builds here. Documentation for Link Shell Extension can be viewed here.

Once you have Link Shell Extension installed, it is very simple to use. Simply right click on the target file (the component zip you want to bundle) and select pick as link source. Then navigate to your main component directory. Right click in the white space and select Drop as and select symbolic link. Make sure to use symbolic link as hardlink will not work the way we want it to.


Linux

Symbolic links can be made using a simple command.

ln -s {target-filename} {symbolic-filename}
More information on creating symbolic links in Linux can be found over at nixCraft.

Windows XP/Server 2003

If you are using an version of Microsoft Windows older than Vista, these do not have symbolic link support. However, you can still bundle components. You just have to be a little more meticulous how you go about it. Everytime you want to build your main component and bundle the other versions with it, you will need to first build those components, then copy the produced zip file from that directory to your main component directory. This process is more time-consuming and can be easily forgotten which is why symbolic links are recommended.

Final Steps

Now that you have a symbolic link (or a copy of the zip file) in your main component directory, you may move on to adding the bundled components to your main component.

You should now be back at the main component wizard screen. From the build menu, select Build. On this screen, click the Add button. Here, you will need to select Component Extra.

This part is slightly tricky. For Sub directory or file, enter “MainComponentFolder/BundledComponent.zip”.

It should be able to find this now that we have our symbolic link (or copy of the component) in place. If it does not find the zip, retrace your steps. Click OK to close this window.

Now you can build your component. If you need to rebuild your components, simply build your extras, then build your main component. If you are using symbolic links there is no need to copy the bundled components. Symbolic links take care of all this.

Categories: OracleUCM

UCM 11.1.1.3.0 patch (9725318) Released

October 4, 2010 1 comment

The first major patch set for Oracle UCM 11gR1 has been available on metalink for a few weeks now.  The official patch date is 20100901-1504 and the patch version is 9725318.  The steps for applying the patch are fairly simple:

  1. Make sure ORACLE_HOME is set to the [ecmhome] directory.
  2. Get the patch zip.Unzip said patch into a temporary directory.
  3. Change into the patch directory.
  4. It contains a top level directory, make sure you change into that as well.
  5. Run OPatch apply: [ecmhome]/OPatch/opatch apply

There are a significant number of updates in the patch, especiallys as relates to URM.

So, for everyone waiting for the first patch before they take UCM for a test drive, you can stop putting it off.

Categories: OracleUCM Tags:

Book Review – The Oracle Universal Content Management Handbook

September 28, 2010 Comments off

The Oracle Universal Content Management Handbook – Build, administer and manage Oracle Stellent UCM Solutions
By Dmitri Khanine

I have found it very easy in my ten years with Content Server to make enough room on my book shelf for books on the topic – there just have not been that many.  When I do get the opportunity to make room it is generally a celebrated day.

In much the same way that Bex Huff’s The Definitive Guide to Stellent Content Server Development  exposed many ‘sysadmins’ and developers to a single source of reference, I am happy to need room on the shelf for Dimtri Khanine’s  The Oracle Universal Content Management .

Conversationally delivered, this book tackles the 10gR3 Content Server picking up where The Definitive Guide left off.  Khanine delivers overview treatment of items that warrant “higher level” coverage, and then drills down through the key concepts and fundamentals of Content Server.  Special attention is paid to the importance of metadata, security and documentation and other resources available to the beginning and/or practicing UCM professional.

Security in the Content Server – as pointed out by the author – is generally an assured point of confusion during the planning and implementation phases of initial efforts in an environment. There have been some clarifying moments in the UCM-focused blogs, but the treatment of the topic in this book places the basics in plain view, in a simplified context. The relationships between Security Groups, Roles and Users are highlighted, and Accounts are then added into the mix. However, Mr. Khanine’s treatment of the topic does not require a whiteboard for understanding. This, in itself, is quite an accomplishment.

If you have been in the “business of technology” for more than 24 hours, it is likely that the acronym “RTFM” (read the friendly manual) is deep-seeded in your everyday life. In this book, the importance of knowing how to find and address the documentation is explored and given its due attention; there is – as alluded to by the author – a ton of information on Content Server.  These many pages cover all tasks associated with deploying, maintaining, customizing, etc. However, how do you navigate this swath of information, locate what you need, distill, consume and use it all in a timely manner to avoid adding days to your projects? This topic is addressed, as well as enhanced with the author’s – a successful UCM consultant – preferences when in need of documentation to solve issues. Additionally, Appendix B of the book includes a reference guide to many of the most respected independent resources on the topic of UCM.

The Oracle Universal Content Management Handbook does not delve deeply into the mechanics of the many ways to customize the Content Server, but instead delivers a nice, wide overview of the many approaches to be considered. In combination with the overviews of the many “moving parts” and the available development resources, the book’s chapter on customization definitely does what it sets out to do:

“Unlike all the previous chapters though, this one has a different purpose. I’m not trying to teach you how to customize and integrate Oracle UCM in an hour or two. It just won’t be possible but what I can do well here is give you a few pointers and insider tips that will save you hours and days down the road.”

This is very useful for the beginning Content Server developer and the veteran alike; to have a reference of the many ways to get things done in UCM as well as a reference to additional resources, all in one place, all to save time the next time a customization is required.

This book will serve as a great reference guide to anyone already living with content management, day to day, and is well worth the cover price for the invaluable compendium of resources in Appendix B.

Categories: OracleUCM

Add Metadata for Secondary Page Name in Site Studio

September 7, 2010 Comments off

This post demonstrates creating user-friendly URLs in Site Studio for secondary pages (think dynamic lists). When you execute the SS_GET_SEARCH_RESULTS service a resultset named SearchResults is returned.  While looping that resultset writing out URLs you should find a variable/column named SSUrl.  The default value for SSUrl will use the Content ID like this:

http://domain.com/NewsRoom/cpw000843

We can change this behavior by adding a configuration variable to the General Configuration section of Content Server named SSUrlFieldName.  We set this variable to the name of a metadata field we can use to control the end of the URL.  This enables us to construct URLs like this instead:

http://domain.com/NewsRoom/TimNewHire.htm

To enable this functionality we first need to create a metadata field that we can use to control the end of the URL.

  1. Open the Configuration Manager Admin Applet (Administration > Admin Applets)
  2. Make sure you have the Information Fields tab selected
  3. Click Add
  4. Supply a name for the field (note this name, we will use it later)
  5. Click OK

On the edit Metadata Field screen set the Field Caption to Page Name, set Field Type to Long Text and Click OK.  Afterwards don’t forget to click “Update Database Design” and “Rebuild Search Index” if necessary.

Log into your Content Server and open Administration > Admin Server > General Configuration.  Add the following setting to the General Configuration and set it to the name of the new metadata field you created a moment ago.  Example:

SSUrlFieldName=SSPageName

Click save to persist your changes and then restart the Content Server.

Now, when you check in a piece of content you will be able to specify the page name for the content. Traditionally the URL will look like this:

http://domain.com/NewsRoom/cpw000843

But if I supply a value for our new Page Name metadata field like TimSmithNewHire the URL will now look like this:

http://domain.com/NewsRoom/TimSmithNewHire

I can also add a “.htm” or “.html” to the value in my field to give the URL a more traditional look and feel like this:

http://domain.com/NewsRoom/TimeSmithNewHire.html

Finally, if you want, you can add a little IdocScript to the derived value for the field in a profile and do things like drop out spaces or ensure that the contributor added htm or html to the end fo the supplied page name.  Here is a sample:

<$pagename = #active.xSSPageName$>
<$pagename = strRemoveWs(pagename)$>
<$dprDerivedValue = pagename$>
<$if not (pagename like "*htm|*html")$>
   <$dprDerivedValue = pagename & ".htm"$>
<$endif$>

Categories: OracleUCM Tags: ,

Start WebLogic Managed Server Without Username and Password

July 27, 2010 1 comment

After you install UCM 11gR1 you may occassionally (or often) start your UCM managed server from the command line.  When you do this, you will get prompted for your weblogic username and password.  If you get tired of this you can create a text file named boot.properties.  In this file, put the following:

username=<your user name here, example: weblogic>
password=<your password here, example weblogic1>

Save the file and place it here:

C:\Oracle\Middleware\user_projects\domains\ecm_domain\servers\UCM_server1\security

You may need to create the security directory.

The next time you start your manage server you will not need to supply the user name or password.  The values for these will be pulled from the boot.properties file.  Additionally the values in your file will be encrypted and written back to the file.  After you have booted the manage server open the properties file to view the encrypted values.

Categories: OracleUCM

Content Basket and ZIP Rendition Management

July 19, 2010 Comments off

The Content Basket component uses the ZIP Rendition Management to package the contents of the basket for download as a ZIP file. By default there are two limitations imposed on your download. It must be a count of five hundred (500) pieces of content or less and it must be a total of five hundred (500) megabytes or less. The two settings that control this are actually part of ZIP Rendition Management and not Content Basket.

MaxRenditionBundleInMegabytes
This variable represents the max size in megabytes (default is 500 megabytes). From the internal notes: Note, it is unlikely that a browser + web server will successfully download a file over 2 gigabytes over 2 gigabytes and you need 8 byte integers in the Content-Length HTTP header) in all scenarios so the effective maximum cap on this value is 2000 megabytes.

MaxRenditionFileEntries
This is the max number of items available to package in the bundle.

Categories: OracleUCM
Follow

Get every new post delivered to your Inbox.