Clone Your Content in UCM


As part of the Blogs and Wikis sample sites available from Metalink, they include supporting components to make them functional. One of the interesting ones comes with the SampleWiki component.

When you load the SampleWikis component, it will also install a component called 'NewItem'. The purpose of this component is to copy/clone existing content items. The wiki site makes use of this by automatically making a copy of a "starter" data file each time you establish a new wiki page. This way the user doesn't have to go through the process of checking in that new data file themselves.

But that functionality may come in handy for you outside the context of a wiki site. Let's say you have a set of standard Word documents that you use as templates. Or maybe a generic corporate sales slide deck. They are a starting point for new documents to be created from. You can use this cloning service to automatically create those new unique documents.

All you need to do is call the CHECKIN_NEW_ITEM_BY_NAME service and pass it the Content ID (dDocName) of the original item. Here is an example of what the URL would look like:


This will create an exact copy of the content item with both the file and metadata. The only thing that will be different is the Content ID. The only other consideration is for items in contribution folders. Because no two files can be in the same folder with the same native file name, the file name of the cloned item will have a unique identifier applied to the name.

Not only can you call it directly in the URL, it's also scriptable so that you can call it within idoc script or through our APIs. And in addition to simply passing the dDocName, you can also pass other metadata fields if you want to override the values of the original. So if you want your cloned item to have a Title that is different, simply pass it a new value for dDocTitle.

In the 7.x version of Content Server, this component added a menu choice on the Content Information page that let you clone the item right there. Because the menu code changed in 10gR3, you no longer see that choice (and why most folks are unaware it's there). But you can easily add the code into the component to get that working again. You can either modify the NewItem component in Component Wizard or modify the resource file directly. The file to modify is [ucm dir]/custom/NewItem/resources/newitem_resource.htm. You then want to add the following section above the closing body tag:

<@dynamichtml custom_docinfo_menus_setup@>
<$include super.custom_docinfo_menus_setup$>
<$exec rsAppendNewRow("PageMenusData")$>
<$PageMenusData.nodeId = "NEW_ITEM"$>
<$PageMenusData.parentId = "CONTENT_ACTIONS"$>
<$PageMenusData.label = "wwCheckInNewItem"$>
<$PageMenusData.type = "item"$>
<$PageMenusData.href="HttpCgiPath" & "?IdcService=CHECKIN_NEW_ITEM_BY_NAME&dDocName=" & dDocName$>
<$PageMenusData.loadOrder = 100$>

In the previous menu code, it references the CHECKIN_NEW_ITEM service, but that service is not configured correctly in the component so the CHECKIN_NEW_ITEM_BY_NAME service is preferred. After modifying the component, restart Content Server.

You should now have a 'Check In New Item' choice on the Content Actions menu on the Content Information pages. You can change the PageMenusData.label line above if you want to provide a different menu label.

Please refer to the readme.txt included with the component for more details and additional example code.


Love the picture.

Posted by Guillaume on January 14, 2010 at 01:23 PM CST #

Hi Kyle,

Thanks for the info.I tried to invoke the service 'CHECKIN_NEW_ITEM_BY_NAME' using RIDC 11g API from a standalone java class.I passed dDocName as the only input parameter as you mentioned here.But while running the program,I am getting the following error.

oracle.stellent.ridc.protocol.ServiceException: No service defined for CHECKIN_NEW_ITEM_BY_NAME.
at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(
at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(
at testClone.main(

I am using oracle content server 10gPS3 with Oracle 11g Enterprise Editon DB.Also I am using RIDC 11.1.1 API.

Pease advise me what to do.


Posted by guest on September 12, 2011 at 09:20 PM CDT #

Hey royinkol,

That would indicate that the component is not actually installed and enabled. Can you go to your Admin Server and verify that the NewItem component is in the enabled list and you have restarted the server?


Posted by Kyle Hatlestad on September 14, 2011 at 12:19 PM CDT #

How to Upload a document a revision if it's already exists in Oracle UCM

Posted by Pavan on January 23, 2012 at 07:39 AM CST #

Hello Pavan,

You must first check-out the document which locks it for your user. Then you can check in a new revision. That is covered in the user guide here:


Posted by guest on February 07, 2012 at 03:19 AM CST #

Hey royinkol,

Add this lib in your project JCR Content Server Adapter.

this probaly can resolve a issue oracle.stellent.ridc.protocol.ServiceException


Posted by Marcos Gomes on January 10, 2013 at 06:31 AM CST #

Post a Comment:
  • HTML Syntax: NOT allowed

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: ateam_webcenter/


« February 2015