Rule to add a publication to DocMaker

The current DocMaker Studio allows you to bundle different files as a single publication. This allows large publications that have been split up into different InDesign documents still to be processed as a single item in DocMaker. In order to accommodate this, a publication is represented in DocMaker by a classification. This classification can then hold multiple records/files.
This does mean that for simple documents (e.g. one file) it seems to be overkill to create a new classification before adding the record to DocMaker. In order to overcome this, you can use the following Adam custom rule action:

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<ref:code><![CDATA[
  Record oRecord = adamObject as Record;
  ClassificationHelper oHelper = new ClassificationHelper(adamApp);
  Guid? gTemplatesId = oHelper.GetId(adamApp.GetSetting("DocMaker_TemplatesRootClassIdentifier").ToString());
  foreach (Guid gChildId in oRecord.Classifications.GetChildIdsOf(gTemplatesId.Value))
  {
    Classification oClassification = new Classification(adamApp);
    oClassification.AddNew(gChildId);
    oClassification.Name = oRecord.Files.LatestMaster.FileName;
    OptionListField oClassType = oClassification.Fields.GetField<OptionListField>
(adamApp.GetSetting("DocMaker_ClassificationType").ToString());
    oClassType.Items.RemoveAll();
    oClassType.Items.Add("Publication");
    oClassification.Save();
    oRecord.Classifications.Remove(gChildId);
    oRecord.Classifications.Add(oClassification.Id);
  }
  return true;
]]></ref:code>

This action can be added as an additional action on the DocMaker_CreateInxRule:

This action will create a new classification under the "Templates" classification that you've chosen for your publication. The name of the new classification will be filename of the master file of the record. It will then mark the classification as a DocMaker publication and relink the record in the new classification.

Comments

Leave a comment
You must be logged in to post comments.
Sign in now
 
 
CATEGORIES
AnnouncementsDocMaker StudioEngineSharePoint ConnectorWeb DevelopmentWebinarsWorkflow Studio
rss feed