IBackgroundTaskHandler - DitaDeliveryCheckRemoteUnpublishStatus
Checks the execution statuses of the packages send for the unpublish by polling the Deployer. If some packages are not finished processing at the moment this background task polls, the background task will reschedule itself to check again later.
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:
- deployerids
-
String with the deployerId which is normally the file name of the package
- Required:
yes
- Required:
- data @numberOfChecksPerformed
-
Defines the number of checks that have been performed already. If the input data is received the first time, the numberOfChecksPerformed attribute is not present, and the default value is used.
- Required:
no - Default value:
0
- Required:
- data @unpublishMaximumProgress
-
Indicates the maximum progress after the unpublish is finished. So, without the progress of the DitaDeliveryCheckRemoteUnpublishStatus.
If the input data is received the first time, the unpublishMaximumProgress attribute is not present, and the maximum progress is retrieved from the database.
- Required:
no - Default value:
0
- Required:
Input data example
This XML example shows typical event input data for this background task:<data numberOfChecksPerformed="0" unpublishMaximumProgress="1">
<export-document-type>ISHPublication</export-document-type>
<export-document-level>lng</export-document-level>
<export-ishlngref>3762134</export-ishlngref>
<creationdate>20170424081850692</creationdate>
<deployerids>ish3762134-1-66560-20180803101340734.zip</deployerids>
</data>
Background task configuration
The list below describes the configurable parameters.- WaitTimeBetweenChecksPerZip
-
Time between execution statuses checks per ZIP package. The actual waiting time between checks is calculated as (
waitTimeBetweenChecksPerZipmultiplied by the number of packages). If the calculated waiting time between checks is less than 60 seconds, the system will use 60 seconds to avoid checking too often.- Required:
yes - Default value:
00:01:00 - Allowed values:
valid HH:mm:ss timespan value
- Required:
- MaximumNumberOfChecks
-
The maximum number of checks after which the background task stops and changes publication output status to
Unpublish Failed.- Required:
yes - Default value:
100 - Allowed values:
valid number
- Required:
- RemoteTimeout
-
The timeout of the http request.
- Required:
no - Default value:
00:05:00 - Allowed values:
valid HH:mm:ss timespan value
- Required:
- RemoteNumberOfRetries
-
The number of times an HTTP request is retried.
- Required:
no - Default value:
2 - Allowed values:
valid number
- Required:
- RemoteWaitTimeBetweenRetries
-
Time to wait between retries of the HTTP request.
- Required:
no - Default value:
00:01:00 - Allowed values:
valid HH:mm:ss timespan value
- Required:
Default background task configuration example
The following configuration gets and handles a DITADELIVERYCHECKREMOTEUNPUBLISHSTATUS event from the background task queue:<handler eventType="DITADELIVERYCHECKREMOTEUNPUBLISHSTATUS">
<scheduler executeSynchronously="false"/>
<authorization type="authenticationContext"/>
<execution timeout="01:00:00" recoveryGracePeriod="00:10:00" isolationLevel="None" useSingleThreadApartment="false"/>
<activator>
<net name="DitaDeliveryCheckRemoteUnpublishStatus">
<parameters>
<parameter name="WaitTimeBetweenChecksPerZip">00:01:00</parameter>
<parameter name="MaximumNumberOfChecks">100</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 ObjectInUse internal failures -->
<add errorNumber="-140" action="Retry" delay="00:10:00" />
</actions>
</errorHandler>
</handler>
Flow
- Checks the execution statuses of the deploying packages.
- If all packages are processed and
- all processed successfully, the publication output status is changed from
UnpublishingtoTo Be Published - one of the packages failed, the publication output status is changed to
Unpublish Failed.
- all processed successfully, the publication output status is changed from
- If not all packages are processed
- If the value of the
numberOfChecksPerformedparameter is less than the value of theMaximumNumberOfChecksparameter, a new DITADELIVERYCHECKREMOTEUNPUBLISHSTATUS event is raised that will start after a certain time. This new event has the same event data, but itsnumberOfChecksPerformedattribute is increased by 1. The delay before start is calculated using the value of theWaitTimeBetweenChecksPerZipparameter multiplied by the number of non-successful packages. - If the value of the
numberOfChecksPerformedparameter is more than the value of theMaximumNumberOfChecksparameter, the publication output status is changed toUnpublish Failed.
- If the value of the
- At the end of every check the progress in event log is updated:
- current progress = @unpublishMaximumProgress + successful deployed packages
- maximum progress = @unpublishMaximumProgress + total packages to deploy
- If all packages are processed and