Documentation Center

Publish throttling by raising different event types per output format

Configuration of distinct even types per publish type variations releases the full capability of the background task engine.

Overview

Historically the event type triggered by any UI or API driven Publish operation triggered a hardcoded event of type named EXPORTFORPUBLICATION on our background task system. From then on all of these publish operations were considered equal. There was no distinction possible based on:

  • Output format, such as PDF (XPP A4), PDF (XPP letter), Content Delivery, Compiled Help, ...
  • Size, such as booklet, service manual, flyer, ...
  • Usergroup.
  • Language.
  • Result (EDT), such as PDF, CHM, ZIP, ...
  • Available licenses of third party software.
  • ...

New IWrite* plugin named 'RaisePublishEvent' [TS-9408]

Technically API calls PublicationOutput20.Publish and PublicationOutput25.SetMetadata (when updating field FISHPUBSTATUS to value VPUBSTATUSPUBLISHPENDING) will no longer raise the hardcoded EXPORTFORPUBLICATION event. This has now moved into a documented plug-in called RaisePublishEvent that also takes care of an EventMonitor entry.

Example: Separate publish to the Content Delivery output format from the other output formats

The goal of this example is to serialize all background tasks that asynchronously connect to Content Delivery like synchronize and publish, without affecting the regular PDF, CHM, ZIP type of publish operations.
  1. Navigate as an Administrator to Settings > XML Write plug-in Settings and adapt or add the following RaisePublishEvent plugin as the last plugin in section <write ishcondition="ISHType='ISHPublication'">. After submit, one output format will trigger an event named EXPORTFORPUBLICATIONREACHINTERNAL while all others will still trigger a EXPORTFORPUBLICATION.
    <plugin name="ISHRAISEPUBLISHEVENT" handler="RaisePublishEvent" ishcondition="ISHLevel='lng' and CurrentAction='SetMetadata'">
    <description>Starts a background task when the 'FISHPUBSTATUS' field is changed to 'Pending'</description>
    <workingset>
      <ishfields>
        <ishfield name="FISHPUBSTATUS" level="lng" />
        <ishfield name="FISHEVENTID" level="lng" />
      </ishfields>
    </workingset>
    <initialize>
      <parameters>
        <parameter name="EventTypeConfiguration">
          <configuration>
            <eventtype ishcondition="FISHOUTPUTFORMATREF='GUID-3005828F-C93A-40DE-B5E9-3B47AD575899'">EXPORTFORPUBLICATIONREACHINTERNAL</eventtype>
            <eventtype>EXPORTFORPUBLICATION</eventtype>
          </configuration>
        </parameter>
      </parameters>
    </initialize>
    </plugin>
  2. Navigate as an Administrator to Settings > XML Background Task Settings.
    1. Duplicate the <handler eventType="EXPORTFORPUBLICATION"> ... </handler> node an adapt the @eventType name to the new entry EXPORTFORPUBLICATIONREACHINTERNAL. Potentially you can adapt configuration like time outs, error numbers, OASIS DITA configurations, ...
    2. Insert a <add ref="EXPORTFORPUBLICATIONREACHINTERNAL"/> next to <add ref="SYNCHRONIZETOLIVECONTENT"/> in the group named SynchronizeToLiveContent. This group is out-of-the-box and part of the Default service role. It is set to only allow 1 execution per BackgroundTask service.
  3. Depending on the event type name, you need to configure EventMonitor so that it groups your Publish related logging entries. We pre-configured the following variations in EventMonitorMenuBar.xml:
    • EXPORTFORPUBLICATION (default)
    • EXPORTFORPUBLICATIONPDF (typically used by all PDF generators like SDL XPP, AntennaHouse XSL Formater, ...
    • EXPORTFORPUBLICATIONZIP (typically used by Web Help, dita, ...
    • EXPORTFORPUBLICATIONCHM (Compiled Help)
    • EXPORTFORPUBLICATIONREACHINTERNAL (internal review collaboration system)
    • EXPORTFORPUBLICATIONREACHEXTERNAL (public delivery system)