DFC DfOperations Classes – Part 1

The operation classes (DfOperation) in the DFC offer huge benefits to developers (and ultimately end users), but seem to get little use or notice. Nearly every application I have supported in the past few years has contained custom implementations of basic library functions (e.g., checkin, checkout, etc.). How many of you have written code to implement one or more of these functions? Perhaps you have a library of these functions that you have written and hardened over time and now tote around with you from project to project. Or worse, rewrite these functions for every project. I know, we’re all guilty of doing it.

However, there is a better way. Documentum, since the beginning of the DFC, has provided the DfOperation classes to implement all of these core library functions:

Library Function Operation Class Purpose
Cancel Checkout IDfCancelCheckoutOperation Releases locks on checked out objects and cleans up local resources allocated to them.
Checkin IDfCheckinOperation Checks in new content, creates necessary versions, releases locks and cleans up locally allocate resources.
Checkout IDfCheckoutOperation Locks the object and exports its content for editing.
Copy IDfCopyOperation Copies objects to other locations in the repository, including deep folder structures and virtual documents.
Delete IDfDeleteOperation Deletes objects from the repository, including deep folder structures and virtual documents..
Export IDfExportOperation Exports content from the repository.
Import IDfImportOperation Imports content from the repository.
Move IDfMoveOperation Moves objects in the repository, including deep folder structures and virtual documents..
Transform IDfTransformOperation Perform an XSL transformation on XML content.
Validation IDfValidationOperation Validate XML documents against an XML schema.

Note: there are no operations for creating or viewing objects.

The advantage to using these operation classes over your own are numerous. Here are a few:

  • Take advantage of the years of thought and testing Documentum has invested in these classes. Documentum uses these classes  internally in its applications (e.g., WDK) so you can be confident they are solid.
  • Insulate your code against underlying changes to Documentum and the DFC. Since Documentum uses these classes internally, any such changes will be adapted by these classes.
  • You can do more with less code. When you see what these classes can do and how they can be used, you’ll wish you had been using them all along.
  • The classes are full featured and provide a consistent methodology for handling errors and even rolling back aborted operations.
  • The classes are all XML and virtual doucment-aware in case you are dealing with XML content or virtual documents.
  • The classes can operate on objects distributed across multiple repositories with no additional work or code.
  • These classes are naturally ACS and BOCS-aware.

In the following few posts I will dig into the DfOperation classes and show you how to use them, demonstrate their advantage over custom code, and hopefully convince you of their utility. In the next few weeks, look for these topics:

  • basic use of DfOperation classes;
  • examples of checkout, checkin, and cancel checkout operation classes;
  • examples of copy, move, delete operation classes;
  • how to handle errors and aborted operations;
  • advanced topics like running operation steps  and using operation monitors.

About Scott
I have been implementing Documentum solutions since 1997. In 2005, I published a book about developing Documentum solutions for the Documentum Desktop Client (ISBN 0595339689). In 2010, I began this blog as a record of interesting and (hopefully) helpful bits of information related to Documentum, and as a creative outlet.

7 Responses to DFC DfOperations Classes – Part 1

  1. Thanks for this article. I know I’m guilty of reinventing the wheel and now I’m inspired to review my code to see where I can incorporate these DfOperations classes.


  2. Pingback: DFC DfOperations Classes – Part 2 « dm_misc: Miscellaneous Documentum Tidbits and Information

  3. Pingback: DFC DfOperations Classes – Part 8 « dm_misc: Miscellaneous Documentum Tidbits and Information

  4. Pingback: DfOperations Sample Code « dm_misc: Miscellaneous Documentum Tidbits and Information

  5. Pingback: dm_misc Wordle « dm_misc: Miscellaneous Documentum Tidbits and Information

  6. Pingback: “The Basics” Series | dm_misc: Miscellaneous Documentum Information

  7. Pingback: Links to All of My Source Code | dm_misc: Miscellaneous Documentum Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: