Documentation Center

Changes to the class BackgroundTask 2.5

Starting from SDL Tridion Docs 13 SP2 the BackgroundTask class should be used to create and retrieve information about the background tasks

Creating background tasks

The BackgroundTask 2.5 class contains 2 methods which can be used to create new background tasks:
  • The method CreateBackgroundTask which can be used to create a background task that can start as soon as the background task gets to the top of the queue.
  • The method CreateBackgroundTaskWithStartAfter which can be used to create a background task that can only be started after the configured date time is passed

Retrieving information about background tasks

In order to find background tasks and retrieve general information (e.g. creation date, status) about the background task and the background task history, you can use the Find method. This method supports
  • the levels "task" and "history"
  • filtering on all background task and background task history columns/fields
  • retrieving metadata using all background task and background task history columns/fields

If you want the blobs linked with the background task (e.g. input data, output data, error), you first need to find the dataid via the Find method and then use the RetrieveDataObjectByIshDataRefs method.