Translate

Friday, 15 April 2011

Documentum: Site Caching Services with multiple targets

Documentum Site Caching Services is limited by its inability to build functionality based on object attributes (the only attribute that it references is Version Label), so in this example a TBO is used to add custom labels.

The scenario is a document can be published to either the Internet or Intranet or both, this is identified by a custom repeating attribute on the document called c_web_target (possible values are ‘Intranet’ & ‘Internet’).
A simple lifecycle has been created for this document type with the stages ‘Draft’, ‘Active’ and ‘Expired’; only active documents are to be published to the web sites.

When the documents are promoted to Active the custom labels should be applied, these are dynamic based on the values in the c_web_target so are not applied within the lifecycle, instead either the doSave or doPromote actions can be extended to call the following procedure:


 protected void applyVersionLabel() throws DfException {
  String DELIM = ":";
  String strTarget = this.getAllRepeatingStrings("c_web_target",DELIM);
  StringTokenizer token = new StringTokenizer(strTarget, DELIM);
  while (token.hasMoreTokens()) {
   String strCurrTarget = token.nextToken();
     this.appendString("r_version_label", strCurrTarget);
  }
 }

Site Caching can then be configured using the versions labels ‘Internet’ and ‘Intranet’.

No comments:

Post a Comment