IBackgroundTaskHandler - ExportObjects
Exports content and metadata of a set of objects to the file system. After completing the export operation, a job specification file is saved to the specified export job folder.
Input data
The input data XML provides the list of language card ids to export. You can specify a folder name, but this is not necessary.- eventdata
-
Input data root element.
- Required: yes
- lngcardids
-
The element text defines the language card ids to export. The element text should contain at least one language card id.
- Required: yes
- foldername
-
The element text can include a folder name; if you specify a folder name, it is prepended to a system-generated timestamp to create a unique export folder name.
- Required: no
Input data example
This XML example shows typical event input data for this background task:
<eventdata>
<lngcardids>791440, 360144, 358292</lngcardids>
<foldername>InboxExport</foldername>
</eventdata>
Background task configuration
The list below describes the configurable parameters.- exportlocation
-
The target/destination folder the exported files are saved to. Each export operation creates a unique sub-folder with the following naming format:
{folderName}.{timestamp}. You can use replacement variables.- Required: yes
- Default value: n/a
- Allowed values: n/a
- Example: %SHPROJECTDATAPATH%\ExportService\Data\DataExports
- exportspeclocation
-
The target/destination folder the export job specification file is saved to. If no destination path is provided for this parameter, it defaults to the same value specified for exportlocation.
- Required: no
- Default value: exportlocation
- Allowed values: n/a
- Example: %SHPROJECTDATAPATH%\ExportService\Data\DataExports
- separatelng
-
Defines whether an additional sub-folder for each language should be created or not.
- Required: no
- Default value:
yes - Allowed values:
yes,no - Example:
yes
- requestedmetadata
-
Defines the metadata to include in the export operation.
- Required: no
- Default value:
<ishfields> <ishfield name='VERSION' level='version' /> <ishfield name='DOC-LANGUAGE' level='lng' /> <ishfield name='FRESOLUTION' level='lng' /> </ishfields> - Allowed values: see Requested metadata
- Example: see default value above.
- raiseevent
-
Defines the name of the background task event to call after the active background task is completed. If no event name is specified, when the active backgroud task is done no follwing background task is called.
- Required: no
- Default value: n/a
- Allowed values: n/a
- Example: ZIPFILES
- filenameprefix
-
File names are generated with the following naming format:
{LogicalId}={Version}={Language}={Resolution}.{FileExtension}The values of the field names defined in this parameter are retrieved from the database, and they are prepended to the file name (refer to the example below). When multiple fields are defined, an
=character is used as a separator.- Required: no
- Default value: n/a
- Allowed values: see Requested metadata
- Example: the field name defined here:
generates this file name: Architecture_Diagram=GUID-XXX=2=en=Low.jpg<ishfields> <ishfield name='FTITLE' level='logical' /> </ishfields>
Default background task configuration example
The following configuration gets and handles an INBOXEXPORT event from the background task queue. The PUBLICATIONEXPORT, REPORTEXPORT , and SEARCHEXPORT handlers have a similar configuration.
<handler eventType="INBOXEXPORT">
<scheduler executeSynchronously="false" />
<authorization type="authenticationContext" />
<execution timeout="01:00:00" recoveryGracePeriod="00:10:00" isolationLevel="None" useSingleThreadApartment="false" />
<activator>
<net name="ExportObjects">
<parameters>
<parameter name="exportlocation">%ISHPROJECTDATAPATH%\ExportService\Data\DataExports</parameter>
<parameter name="exportspeclocation">%ISHPROJECTDATAPATH%\ExportService\Data\WatchFolder</parameter>
<parameter name="separatelng">yes</parameter>
<parameter name="requestedmetadata">
<ishfields>
<ishfield name="FSTATUS" level="lng" />
</ishfields>
</parameter>
<parameter name="raiseevent">ZIPFILES</parameter>
<parameter name="filenameprefix">
<ishfields>
<ishfield name="FTITLE" level="logical" />
</ishfields>
</parameter>
</parameters>
</net>
</activator>
<errorHandler maximumRetries="0" />
</handler>
File system export
Export job specification XML
When the background task is completed, the export job specification file is saved to the path defined in the exportspeclocation parameter.
Its file name is generated with the following naming format: EXPORT.<event data folder name>.<timestamp>.xml. For example: EXPORT.SearchExport.20141006163132872.xml.
<massexportspec>
<location>C:\InfoShare\Data\ExportService\Data\DataExports\SearchExport.20141007111417523</location>
<requestedmetadata>
<ishfields>
<ishfield name="FTITLE" level="logical" />
<ishfield name="VERSION" level="version" />
<ishfield name="DOC-LANGUAGE" level="lng" />
<ishfield name="FRESOLUTION" level="lng" />
<ishfield name="FSTATUS" level="lng" />
</ishfields>
</requestedmetadata>
<separatelng>yes</separatelng>
</massexportspec>