Documentation Center

IBackgroundTaskHandler - DitaDeliveryUnpublish

Trirggers a unpublish in Dynamic Delivery

Input data

The input data XML identifies a publication output:

export-document-type
The ishtype of the starting object. The value is always ISHPublication.
  • Required: yes
export-document-level
The level of the starting object. The value is always lng.
  • Required: yes
export-ishlngref
The numerical identifier of the publication output.
  • Required: yes
creationdate
Date time indicating when the unpublish was triggered.
  • Required: no

Input data example

This XML example shows typical event input data for this background task:
<data>
  <export-document-type>ISHPublication</export-document-type>
  <export-document-level>lng</export-document-level>
  <export-ishlngref>3733865</export-ishlngref>
  <creationdate>20180727025137019</creationdate>
</data>

Background task configuration

The list below describes the configurable parameters.
Action
Full path to the folder where a sub folder is created into which all files will be exported
  • Required: yes
  • Default value: IshUnPublish
  • Allowed values: Valid action name
Verbs
The names of the verbs that the queue operates upon. Multiple verbs need to be separated with ", " (comma+space)
  • Required: yes
  • Default value: IshPrepare, IshProcess
  • Allowed values: Valid verb names
NumberOfRetries
The number of times an http request to Dynamic Delivery is retried
  • Required: yes
  • Default value: 2
  • Allowed values: Valid number
Timeout
Timeout of the http request Dynamic Delivery to Dynamic Delivery
  • Required: No
  • Default value: 00:02:00
  • Allowed values: Valid TimeSpan
WaitTimeBetweenRetries
Time to wait between retries of the http request to Dynamic Delivery
  • Required: No
  • Default value: 00:00:30
  • Allowed values: Valid TimeSpan
FinishUnpublishBackgroundTaskEventType
Event type of the background task which will check if the uploaded packages are successfully unpublished in Dynamic Delivery
  • Required: No
  • Default value: DITADELIVERYCHECKREMOTEUNPUBLISHSTATUS
  • Allowed values: Event type of a configured background task

Default background task configuration example

The following configuration gets and handles a DITADELIVERYUNPUBLISH event from the background task queue:
<handler eventType="DITADELIVERYUNPUBLISH">
  <scheduler executeSynchronously="false"/>
  <authorization type="authenticationContext"/>
  <execution timeout="01:00:00" recoveryGracePeriod="00:10:00" isolationLevel="None" useSingleThreadApartment="false"/>
  <activator>
    <net name="DitaDeliveryUnpublish">
      <parameters>
        <parameter name="Location">%ISHPROJECTDATAPATH%\Unpublish\Data</parameter>
        <parameter name="Action">IshUnPublish</parameter>
        <parameter name="Verbs">IshPrepare, IshProcess</parameter>
        <parameter name="Timeout">00:02:00</parameter>
        <parameter name="NumberOfRetries">2</parameter>
        <parameter name="FinishUnpublishBackgroundTaskEventType">DITADELIVERYCHECKREMOTEUNPUBLISHSTATUS</parameter>
      </parameters>
    </net>
  </activator>
  <errorHandler maximumRetries="3">
    <actions>
      <!-- Retry on connection failures to the external system -->
      <add errorNumber="-111001" action="Retry" delay="00:10:00" />
      <!-- Retry on integration failures to the external system -->
      <add errorNumber="-111002" action="Retry" delay="00:10:00" />
      <!-- Retry on publication was locked by another user -->
      <add errorNumber="-140" action="Retry" delay="00:10:00" />
    </actions>
  </errorHandler>
</handler>

Flow

  1. Validate the incoming inputdata.

    Check that the publication exists and that the unpublish action was not cancelled

  2. Change the status from Unpublish Pending to Unpublishing
  3. Generate a package file using the language reference of the incoming publication (~ publish plugin DitaDeliveryPrepareOverallPackage)
  4. Compress this package file
  5. Upload the compressed package file to Dynamic Delivery (~ publish plugin DitaDeliveryUploadPackages)
  6. If a FinishUnpublishBackgroundTaskEventType background task is specified, the background task is created and the publication remains in Unpublishing . Otherwise the status of the publication is changed into To Be Published.