Represents the actions to be taken when a document's lifecycle state is changed. A document's lifecycle states are defined in the DocumentStates collection of its associated DocumentLifecyclePolicy object. A document lifecycle policy defines a set of valid lifecycle states for a document, controls the transition of those states, and specifies the actions to be taken when a document's lifecycle state changes. To change the lifecycle state of a document, call its ChangeState method; you can change a document's current lifecycle state to another predefined state, set it to an exception state, or clear it from an exception state by specifying the appropriate LifecycleChangeFlags constant in the flags parameter.

To define the actions to take when a document’s lifecycle state is changed, write a Java handler class that implements the DocumentLifecycleActionHandler interface and code the actions to be taken for each type of lifecycle state change in the appropriate method. After you have finished writing the Java handler, you have two choices:

  • Check in the Java handler as a document and create a CodeModule object (using its CreateInstance factory method). Set the CodeModule property of the DocumentLifecycleAction object to the document that you checked in, and cast it as a CodeModule object.
  • Specify the Java handler in the classpath of your application server (it is not necessary to create a CodeModule object).

Lastly, set the ProgId property of the DocumentLifecycleAction object to the fully qualified package and class name of the Java handler.


The following tables list the members exposed by IDocumentLifecycleAction.

Public Properties

 NameDescription
Public propertyDocumentLifecyclePoliciesSpecifies a DocumentLifecyclePolicySet object that contains the collection of DocumentLifecyclePolicy objects associated with this object store or DocumentLifecycleAction object.
Top

Public Methods

 NameDescription
Public methodChangeClassChanges the class of a Content Engine object. The new class must already exist and both it and the original class must be subclasses of the same base class. The ChangeClass method does not modify the security for an object, even if the object's current security is derived from the default security for its source class. For the object's user-defined properties, the following rules apply:
  • Any user-defined properties that exist in the new class but not in the original class are set to the default value defined by the new class (or to null if there is no default defined).
  • Any user-defined properties that exist in both the original and the new class that are writable and have the same value (including null) as the default value defined in the original class will be set to the default value defined by the new class. However, any user-defined property that has had its value modified from the default value will retain that modified value in the new class.
  • Any user-defined properties whose definitions exist in the original class but not in the new class will no longer exist on the object when its class is changed.

When the class of a document object is changed, the default document lifecycle policy of the new class will only be applied to the document object's DocumentLifecyclePolicy property if both of the following scenarios occur:

  • The document has no current lifecycle policy.
  • The document is either a reservation object, or is the current version object and is not reserved.

Top

See Also