Skip navigation links
DFC 23.4

Package com.documentum.fc.lifecycle

Provides interfaces for defining logic on lifecycles.

See: Description

Package com.documentum.fc.lifecycle Description

Provides interfaces for defining logic on lifecycles. This logic falls into two primary categories. The first category pertains to state changes that occur on documents attached to lifecycles, the second is validation of the lifecycle prior to its use.

The following interfaces pertain to state changes:

The interface IDfLifecycleValidate is used to verify the lifecycle definition is valid prior to installing it.

The following example code demonstrates how to establish a session and create a document:


public class PublishedState

  implements IDfLifecycleUserEntryCriteria,
             IDfLifecycleUserAction,
             IDfLifecycleUserPostProcessing,
             IDfModule
{

  private boolean isReviewSignedOff (IDfSysObject obj)
    throws DfException
  {
    IDfQuery query = new DfQuery();
    query.setDQL ("select user_name from dm_audittrail " +
                  "where event_name = 'dm_signoff' and " +
                  "audited_obj_id = '" + obj.getObjectId().toString() + "' and " +
                  "string_2 = 'REVIEWED'");

    IDfCollection collection = query.execute (obj.getSession(), DfQuery.DF_READ_QUERY);
    boolean result = collection.next();
    collection.close();
    return result;
  }

  private void publishSignOff (IDfSysObject obj, String userName)
    throws DfException
  {
    obj.signoff (userName, "", "PUBLISHED");
  }

  public boolean userEntryCriteria(IDfSysObject obj,
                                   String userName,
                                   String targetState)
    throws DfException
  {
    return isReviewSignedOff (obj);
  }

  public void userAction(IDfSysObject obj,
                         String userName,
                         String targetState)
    throws DfException
  {
    obj.mark ("PUBLISHED");
  }

  public void userPostProcessing (IDfSysObject obj,
                                  String userName,
                                  String targetState)
    throws DfException
  {
    publishSignOff (obj, userName);
  }
}
Skip navigation links
DFC 23.4

Copyright 1994-2023 OpenText Corporation. All rights reserved.