IBackgroundTaskHandler - DitaDeliveryUnpublish
Trirggers a unpublish in Dynamic Delivery
Input data
The input data XML identifies a publication output:
- export-document-type
-
The
ishtypeof the starting object. The value is alwaysISHPublication.- Required:
yes
- Required:
- export-document-level
-
The
levelof the starting object. The value is alwayslng.- Required:
yes
- Required:
- export-ishlngref
-
The numerical identifier of the publication output.
- Required:
yes
- Required:
- creationdate
-
Date time indicating when the unpublish was triggered.
- Required:
no
- Required:
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
- Required:
- 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
- Required:
- NumberOfRetries
-
The number of times an http request to Dynamic Delivery is retried
- Required:
yes - Default value:
2 - Allowed values: Valid number
- Required:
- Timeout
-
Timeout of the http request Dynamic Delivery to Dynamic Delivery
- Required:
No - Default value:
00:02:00 - Allowed values: Valid TimeSpan
- Required:
- WaitTimeBetweenRetries
-
Time to wait between retries of the http request to Dynamic Delivery
- Required:
No - Default value:
00:00:30 - Allowed values: Valid TimeSpan
- Required:
- 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
- Required:
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
- Validate the incoming inputdata.
Check that the publication exists and that the
unpublishaction was not cancelled - Change the status from
Unpublish PendingtoUnpublishing - Generate a package file using the language reference of the incoming publication (~ publish plugin
DitaDeliveryPrepareOverallPackage) - Compress this package file
- Upload the compressed package file to Dynamic Delivery (~ publish plugin
DitaDeliveryUploadPackages) - If a
FinishUnpublishBackgroundTaskEventTypebackground task is specified, the background task is created and the publication remains inUnpublishing. Otherwise the status of the publication is changed intoTo Be Published.