Maintaining Revision Levels

A question that came up on an earlier blog post was how to limit the number of revisions on a piece of content. UCM does not inherently enforce any sort of limit on how many revisions you can have. It's unlimited.

In some cases, there may be content that goes through lots of changes, but there just simply isn't a need to keep all of its revisions around. Deleting those revisions through the content information screen can be very cumbersome. And going through the Repository Manager applet can take time as well to filter and find the revisions to get rid of.

But there is an easier way through the Archiver. The Export Query criteria in Archiver includes a very handy field called 'Revision Rank'. With revision labels, they typically go up as new revisions come in (e.g. 1, 2, 3, 4, etc...). But you can't really use this field to tell it to keep the top 5 revisions. Those top 5 revision numbers are always going up. But revision rank goes the opposite direction. The very latest revision is always 0. The previous revision to that is 1. Previous revision to that is 2. And so on and so forth. With revision rank, you can set your query to look for any Revision Rank greater or equal to 5. Now as older revisions move down the line, their revision rank gets higher and higher until they reach that threshold. Then when you run that archive export, you can choose to delete and remove those revisions.

Running that export in Archiver is normally a manual process. But with Idc Command, you can script the process and have it run automatically from the server. Idc Command is a utility that allows you to run any of the content server services via the command line. You basically feed it a text file with the services and parameters defined along with the user to run it as. The Idc Command executable is located within the \bin\ directory:

$ ./IdcCommand -f DeleteOlderRevisions.txt -u sysadmin -l delete_revisions.log

In this example, our IdcCommand file to run the export and do the deletions would look like:


You can then use automated scheduling routines in the OS to run the command and command file at the frequency needed.

Remember that you are deleting the revisions from within UCM, but they are still getting placed within the archive. So you will need to delete those batches to have them fully removed (or re-import if you need to recover them).

For more information about Idc Command, you can find that in the Idc Command Reference Guide.


You can prevent those batches from accumulating by telling the archive to remove old batches as new ones are created. Tick the "Replace existing export files" option on your archive.

Posted by mikey on March 30, 2010 at 01:17 PM CDT #

Doh! Totally forgot about that setting. Thanks for pointing that out!

Posted by kyle.hatlestad on March 30, 2010 at 11:46 PM CDT #

Hi kyle, I tried IdcCommand approach for export_archive service, On command prompt i am getting "Success in executing service'. Whereas when i check archive log , i am getting following exception. Export error for archive 'test' in collection 'idc': Error: [ Details ] An error has occurred. The stack trace below shows more information. !$!csExportErrorForArchiveInCollection,test,idc!syGeneralError intradoc.common.ServiceException: !csExportErrorForArchiveInCollection,test,idc!syGeneralError at intradoc.server.archive.ArchiveHandler.doArchiving( at intradoc.server.archive.ArchiverMonitor.doArchiving( at intradoc.server.archive.ArchiverMonitor$ at Source) Please help. Thanks, Aman

Posted by Aman on May 05, 2010 at 03:32 PM CDT #

Hello Aman, Are you sure your archive name is correct? If I mispell the archive name that I created in the Archiver applet, I get the same error that you are getting. Once I define aArchiveName value correctly, then it works for me. Hope that helps, Kyle

Posted by kyle.hatlestad on May 06, 2010 at 06:15 AM CDT #

Thanks Kyle. It worked and it was a spelling mistake :( Thanks again, Aman

Posted by Aman on May 06, 2010 at 11:14 AM CDT #

Hi Kyle, I am trying to run Collection_set_Archive from IdcCommand .This command is for importing archived folder structure. Config File @Properties LocalData IdcService=COLLECTION_SET_ARCHIVE archiveName=@Include C:\CollectionArchive.hda @end <> I have downloaded C:\CollectionArchive.hda from folder export utility (folder_g). When I run this command I get following error: Error executing service COLLECTION_SET_ARCHIVE. csUnabletoUnpackageBinder. Where am I going wrong? Please help. Thanks, Aman

Posted by Aman on May 09, 2010 at 12:43 PM CDT #

Hi Kyle, Was looking for info on Major and Minor revisions in UCM. Is it possible to create content using only minor revison? like 0.1,0.2,0.3 etc and move to Major revision 1,2,3 once approved. This way itt is easier to do purning by removing all minor versions of a content item and retaining only major versions. How does it sound? can we do this in UCM? thanks, deepak

Posted by Deepak on May 11, 2010 at 07:42 PM CDT #

Hey Aman, Afraid I'm not that familiar with that service. I would recommend turning on the CGI debugging in Filter Administration to see the service parameters when executed through the browser and web server. Perhaps that will lend a clue. Thanks, -KyleKyle

Posted by kyle.hatlestad on May 12, 2010 at 01:49 AM CDT #

Hello Deepak, Unfortunately, not natively. This would require a custom component. I believe you would need to modify the RevisionImplementor in order to do that. Thanks, -Kyle

Posted by kyle.hatlestad on May 12, 2010 at 02:12 AM CDT #

Hi Kyle, I'm trying to use your IdcCommand and the EXPORT_ARCHIVE service to remove revision above a given limit. It fails each time by saying that "only the server is habilitated to do that ..." Do I need to assign somekind of access level (group) to the OS user calling IdcCommand ? regards

Posted by Guy on May 17, 2010 at 07:37 AM CDT #

Hey Guy, What user are you passing as part of the '-u' option? That is the user who is performing the action. It should be sysadmin or another user with the 'admin' role. Other then that, this service should be available to run this way. Thanks, -Kyle

Posted by kyle.hatlestad on May 17, 2010 at 08:08 AM CDT #

Hi Kyle thanks for answering. I used sysadmin with the -u parameter. here are the lines I put in the intradoc.cfg file: IdcCommandFile=/home/appenv80/DeleteRev/DeleteOlderRevisions.hda IdcCommandUserName=sysadmin IdcCommandLog=/home/appenv80/DeleteRev/DeleteOlderRevisions.log ConnectionMode=auto Therefore, I just need to invoke IdcCommand and the lines I put in the .hda file: @Properties LocalData IdcService=EXPORT_ARCHIVE aArchiveName=DeleteOlderRevisions aDoDelete=1 IDC_Name=ucmcontrib_pdev01 dataSource=RevisionIDs @end <> it seems to be ok ... I get this feedback: Service 'DELETE_DOC' expected Service 'DELETE_BYREV_REVISION' expected StandardFileStore: lancé. 18/05/2010: Error when executing the service :EXPORT_ARCHIVE Only the server is autorized to execute the command. 'EXPORT_ARCHIVE'. These services belong to "core content server services" Does my Os user need to belong to a particular group to allow implicit authentification. Thanks Guy

Posted by Guy on May 18, 2010 at 12:53 AM CDT #

Hey Guy, No, the OS user should not be the issue. According to that error, it doesn't think that service is being executed in context of the server. You are running this on the UCM server, correct? Try this configuration value in your intradoc.cfg instead of auto: ConnectionMode=server Note that the server must be up and running in order for this connection mode to work. If that does not work, you may need to contact support and they should be able to troubleshoot further. Thanks, -Kyle

Posted by kyle.hatlestad on May 18, 2010 at 01:02 AM CDT #

Hi Kyle IdcCommand coudn't connect to UCM because it was using HttpServerAddress (that pointed to the load balancer) and for obscure reasons it couldn't initiate a socket. This occured because my UCM is clustered. The solution is to use IdcCommandServerHost= in /bin/intradoc.cfg file or in the config file. IdcCommandServerHost is documented in Idoc Script Reference Guide, page 6-327 as well as other interesting stuff. Thanks to Oracle support for their help. regards Guy

Posted by Guy on May 20, 2010 at 05:44 AM CDT #

Hi Kyle, While Importing the website dumps I'm getting following error: 3:01 PM The definition file for archive 'Website_trade' went unexpectedly missing in the the collection directory 'c:/oracle/ucm/idcm1/archives/'. Kindly help me this.

Posted by garima on June 09, 2010 at 01:29 AM CDT #

Hey Garima, Did something happen to that archive? Are you able to export the archive manually through the Archiver applet. I'm not familiar with that error or what may cause it other then the archive itself being deleted. If it's still there and works in the applet, you may want to check with technical support on the meaning of that error. Thanks, -Kyle

Posted by kyle.hatlestad on June 10, 2010 at 12:54 AM CDT #

Hey quick question about archiver manager -- when sending a batch to consumption and it errors in consumption. If you delete those batch files - what do you need to do to ensure that those changes go to consumption again? Best Danielle

Posted by guest on June 11, 2011 at 09:56 AM CDT #

Hey Danielle, if you've deleted those batches, you'll need to export them again and transfer those items. That's probably easiest to do in a separate archive you create for this one-time transfer. Just create the export properties to capture the items that would have been part of the original batches, probably based on criteria and time. Then transfer and import those on consumption. Thanks, Kyle

Posted by Kyle Hatlestad on June 14, 2011 at 06:37 AM CDT #

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/


« June 2016