IBackgroundTaskHandler - CreateTranslationFromList
Creates the translations in the target languages starting from the specified source language objects.
Input data
The input data XML specifies...
- How to get to the target languages which will be created.
- The target languages can be selected by the user or can be calculated using the requested and inherited languages or it can be a combination of both.
- The source language objects of one or multiple logical objects
- data
-
Input data root element.
- Required: yes
- targetlanguages
-
Element containing a comma-space separated list with target languages which are selected by the user
- Required: no
- requestedlanguages
-
Element indicating whether the requested languages of the current object must be merged with the supplied target languages
- Required: yes
- Allowed values: true/false
- inheritedlanguages
-
Element indicating whether the requested (and inherited) languages of the maps or topics referencing the current object must be merged with the supplied target languages
- Required: yes
- Allowed values: true/false
- ishfields
-
A Metadata xml structure to specify extra fields which will be set when creating new target language objects.
- Required: no
- ishobjects
-
Source language object container which should contain minimally one ishobject .
- Required: yes
- ishobject
-
The ishobject element with the following required attributes specifies one source language object :
- ishtype
- The object type (ISHMasterDoc, ISHModule, ISHIllustration, ISHTemplate and ISHLibrary)
- ishref
- String with the logical identifier of the object
- ishlogicalref
- The identifier of the logical level
- ishversionref
- The identifier of the version level
- ishlngref
- The identifier of the language level
Input data example
This example shows typical event input data for this background task:<data>
<targetlanguages></targetlanguages>
<requestedlanguages>true</requestedlanguages>
<inheritedlanguages>true</inheritedlanguages>
<ishfields></ishfields>
<ishobjects>
<ishobject ishref="GUID-F907E081-CAF5-4B3F-91F3-8CADDD573C00" ishtype="ISHLibrary" ishlogicalref="6256" ishversionref="6258" ishlngref="7193"/>
<ishobject ishref="GUID-F907E081-CAF5-4B3F-91F3-8CADDD573C00" ishtype="ISHLibrary" ishlogicalref="6256" ishversionref="6258" ishlngref="6262"/>
<ishobject ishref="GUID-5D93422A-8CFE-4514-876F-37A05F43BE1B" ishtype="ISHModule" ishlogicalref="8665" ishversionref="3556" ishlngref="3545"/>
</ishobjects>
</data>
Background task configuration
There are no configurable parameters.
Default background task configuration example
The following configuration gets and handles a CREATETRANSLATIONFROMLIST event from the background task queue:<handler eventType="CREATETRANSLATIONFROMLIST">
<scheduler executeSynchronously="false" />
<authorization type="authenticationContext" />
<execution timeout="01:00:00" recoveryGracePeriod="00:10:00" isolationLevel="None" useSingleThreadApartment="false" />
<activator>
<net name="CreateTranslationFromList">
<parameters />
</net>
</activator>
<errorHandler maximumRetries="3">
<actions>
<add errorNumber="*" action="Retry" delay="00:01:00" />
</actions>
</errorHandler>
</handler>
Flow
- Determine whether the source language objects in the input data all belong to the same logical object. If so, the can all be passed to the "CREATETRANSLATION" background task. If not, they have to be grouped by logical id, to avoid blocking issues and every group should be passed to the "CREATETRANSLATION" background task separately.
- For every group of source language objects in the input data that belong to the same logical object:
- Generate a new event data, containing only the source language objects from that group. Keep the rest of the event data from the incoming event data.
- Using generated event data, create a new background task with event type "CREATETRANSLATION".