Documentation Center

IBackgroundTaskHandler - SmartTag

Retrieves tags using document content and updates metadata.

Input data

The input data XML can start from the source language objects of one or multiple logical objects or input data identifies a topic.

  • The source language objects of one or multiple logical objects input data XML specifies
    ishobjects
    Input data root element. Source language object container which should contain minimally one ishobject.
    • Required: yes
    ishobject
    The ishobject element with the following required attributes specifies one source language object :
    ishtype
    The object type (ISHMasterDoc, ISHModule, ISHIllustration, ISHTemplate and ISHLibrary)
    ishref
    String with the logical identifier of the object
    ishlngref
    The identifier of the language level
  • The identifying topic input data XML specifies
    ishobject
    Input data root element.
    • Required: yes
    ishobject @ishref
    Logical identifier of the object.
    • Required: yes
    ishobject @ishtype
    Defines the object type. This background task handles only topics; therefore, the expected object type is ISHModule.
    • Required: yes
    ishfields
    Object metadata fields container. The fields container can have one or more ishfield elements. .
    • Required: yes
    ishfield
    Object metadata field.
    • Required: yes
    • Required ishfield elements for this background task:
      • VERSION
      • DOC-LANGUAGE
    • Optional ishfield elements for this background task:
      • FRESOLUTION
    ishfield @name
    Defines the name of the ishfield metadata element.
    • Required: yes
    ishfield @level
    Defines the level of the ishfield metadata element.
    • Required: yes
    • Allowed values:
      • logical
      • version
      • lng

Input data example

This example shows typical source language objects of one or multiple logical objects event input data for this background task:
<data>
    <ishobjects>
        <ishobject ishref="GUID-F907E081-CAF5-4B3F-91F3-8CADDD573C00" ishtype="ISHLibrary" ishlngref="7193"/>
        <ishobject ishref="GUID-F907E081-CAF5-4B3F-91F3-8CADDD573C00" ishtype="ISHLibrary" ishlngref="6262"/>
        <ishobject ishref="GUID-5D93422A-8CFE-4514-876F-37A05F43BE1B" ishtype="ISHModule" ishlngref="3545"/>
    </ishobjects>
</data>
This example shows typical event input data identifies a topic for this background task:
<ishobject ishref="GUID-0B3EA307-72CC-4B25-B9E8-D6479068DD7A" ishtype="ISHModule">
  <ishfields>
    <ishfield name="VERSION" level="version">2</ishfield>
    <ishfield name="DOC-LANGUAGE" level="lng">en</ishfield>
    <ishfield name="FRESOLUTION" level="lng"></ishfield>
  </ishfields>
</ishobject>

Background task configuration

The list below describes the configurable parameters.
SetMetadataFieldOverwriteExisting
Indicates that existing tag field value should be overwritten with retrieved tags. By default retrieved tags will be appended to existing field value.
SetMetadataFieldNames
Limits the number of smarttaggable fields to update. If parameter is specified only specified fields will be updated, otherwise all smarttagable fields will be updated.

Default background task configuration example

The following configuration gets and handles a SMARTTAG event from the background task queue:
<handler eventType="SMARTTAG">
      <scheduler executeSynchronously="false"/>
      <authorization type="authenticationContext"/>
      <execution timeout="01:00:00" recoveryGracePeriod="00:10:00" isolationLevel="None" useSingleThreadApartment="false"/>
      <activator>
        <net name="SmartTag">
          <parameters>
            <parameter name="SetMetadataFieldOverwriteExisting">false</parameter>
            <parameter name="SetMetadataFieldNames">FPPARTYCONCEPTS, FPPARTYCONCEPTS2</parameter>
          </parameters>
        </net>
      </activator>
      <errorHandler maximumRetries="3">
        <actions>
          <!-- For a timeout or a lock, wait longer before retrying -->
          <add errorNumber="-140" action="Retry" delay="00:10:00"/>
          <!-- Just retry -->
          <add errorNumber="*" action="Retry" delay="00:01:00"/>
        </actions>
      </errorHandler>
    </handler>

Flow

  1. Initialize the smarttaggable fields by retrieve fields setup.
  2. Determine the language objects which must be tagged.
  3. Retrieve field tags using DocumentObject.SmartTagByIshLngRef call.
  4. Update metadata with fields containing retrieved tags.