- General Information
- Connecting Third-party Systems
- crossConnect for content systems
- crossConnect for External Editing
- Purpose and usage
- Requirements
- Implementation
- Across XLIFF format
- Across-specific Extensions
- <xliff> Element Attributes
- <file> Element Extensions
- <trans-unit> Element Extension
- Paragraph States
- Paragraph State Flags
- <source> and <target> Element Content
- <bpt> Element Attributes
- <ph> Element Attributes
- <x> Element Attributes
- Across-specific Properties
- Analysis Results
- Sample Files
- Across XLIFF - import, export and segmentation
- Context information
- Exporting best matches in Across XLIFF
- Hyperlinks to XLIFF
- Secure file handling with C#
- Secure file handling with JAVA
- Workflow and vendor configuration
- Sample code - Integrated solution
- Across XLIFF format
- Generic File Connector
- Display Texts
- APIs
- APIs - Technology
- crossTank API v1
- crossTank API v2
- crossTerm API v1
- crossTerm API v2
- crossAPI SI
- Requirements
- Function Return Types
- crossAPI SI and Java
- List of Objects in crossAPI SI
- Sample - transferring checkout files via FileManager
- Sample - VBS
- Text Preprocessing API
TaskManager
- Unless stated otherwise, all objects are available in the following Across versions:
- 5.7
- 6.0
- 6.3
- 7.0
Function-specific return values are listed with each function.
For more information on return values and a complete list of error codes, see Function Return Types.
Function | Description |
Cancels the specified job. The function only works for jobs created from TaskManager functions. | |
Exports a task to an EWU (External Processing Work Unit) file. | |
Exports a task to an XLIFF file. | |
Returns the progress of a job. The function only works for jobs created from TaskManager functions. | |
Returns the result of a finished job. The function only works for jobs created from TaskManager functions. | |
Returns the status of a job. The function only works for jobs created from TaskManager functions. | |
Returns the due date of a specified task. | |
Returns the finish date of a specified task. | |
Gets the GUID of a task. | |
Gets the GUID of a target language editing task and supports access to tasks of partitioned documents. | |
Returns the progress of a task. | |
Returns the state of a task. | |
Returns the statistics of a task. | |
Imports an ERU (External Processing Response Unit) file to a task. | |
Imports an XLIFF file to a task. | |
Returns whether a task is assigned or not. | |
Returns whether a task is finished or not. | |
Sets a task to confirmed. | |
Sets the due date of a specific task. | |
Sets a task to finished or unfinished. | |
Sets the task progress. | |
Sets the start date of a task to the given date and time. Checks if date and time is allowed as a start date for the task. | |
Changes one paragraph state to another for the specified task. The task cannot be read-only, i.e. it needs to be ready for processing like when it is opened in the Across client. |
TaskManager.CancelJob
Cancels the specified job. The function only works for jobs created from TaskManager functions.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | JobGuid | The GUID of the job. |
Return Values
Result | Type/Value | Interpretation |
Success | Is always empty. | |
Error | 17 | Job does not exist. |
Error | 87 | Job already finished. |
Error | 88 | Canceling is not supported for the job. |
TaskManager.ExportTaskToEwu
Exports a task to an EWU (External Processing Work Unit) file.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | string | OutputFileName | The name of the output file. You have to enter a path. |
4 | string | ToolGuid | Guid of the external processing tool. Attention There must be a corresponding license for the tool. |
Return Values
Result | Type/Value | Interpretation |
Success | string | The GUID of the job. |
Error | 18 | Unable to create job. |
Error | 53 | Task does not exist. |
TaskManager.ExportTaskToXliff
Exports a task to an XLIFF file.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | string | OutputFileName | The name of the output file. You have to enter a path. |
Return Values
Result | Type/Value | Interpretation |
Success | string | The GUID of the job. |
Error | 18 | Unable to create job. |
Error | 53 | Task does not exist. |
Error | 202 | You do not have a license for XLIFF import/export. |
TaskManager.GetJobProgress
Returns the progress of a job. The function only works for jobs created from TaskManager functions.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | JobGuid | The GUID of the job. |
Return Values
Result | Type/Value | Interpretation |
Success | int | The progress of the job in percent. |
Error | 17 | Job does not exist. |
Error | 21 | Job has been canceled. |
Other return values are possible. They depend on the executed job and mean the job itself failed.
Do not use this method to find out whether a job is finished or not. A progress of 100 does not necessarily mean that the job is finished already. Use GetJobStatus instead.
TaskManager.GetJobResult
Returns the result of a finished job. The function only works for jobs created from TaskManager functions.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | JobGuid | The GUID of the job. |
Return Values
Result | Type/Value | Interpretation |
Success | int | The progress of the job in percent. |
Error | 17 | Job does not exist. |
Error | 21 | Job has been canceled. |
Error | 43 | The job has not yet been completed. |
Other return values are possible. They depend on the executed job and mean the job itself failed.
TaskManager.GetJobStatus
Returns the status of a job. The function only works for jobs created from TaskManager functions.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | JobGuid | The GUID of the job. |
Return Values
Result | Type/Value | Interpretation |
Success | int | The status of the job.
|
Error | 17 | Job does not exist. |
TaskManager.GetTaskDeadline
Returns the due date of a specified task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
Return Values
Result | Type/Value | Interpretation |
Success | DateTime | The due date of the task. |
Error | 53 | Task does not exist. |
TaskManager.GetTaskFinishDate
Returns the finish date of a specified task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
Return Values
Result | Type/Value | Interpretation |
Success | DateTime | The due date of the task. |
Error | 53 | Task does not exist. |
TaskManager.GetTaskGuid
Gets the GUID of a task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | DocumentGuid | The GUID of the document. |
3 | int | SourceLanguageLcid | The LCID of the source language. |
4 | int | TargetLanguageLcid | The LCID of the target language. |
5 | string | TaskTemplateGuid | The GUID of the task template. |
Return Values
Result | Type/Value | Interpretation |
Success | string | Contains the guid of the task. |
Error | 15 | Language does not exist. |
Error | 16 | Document does not exist. |
Error | 24 | Workflow does not exist. |
Error | 27 | Task template does not exist. |
Error | 53 | Task does not exist. |
Error | 180 | The document is not ready because it is being checked in. |
TaskManager.GetTaskGuid2
Gets the GUID of a target language editing task and supports access to tasks of partitioned documents.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | DocumentGuid | The GUID of the document. |
3 | int | SourceLanguageLcid | The LCID of the source language. |
4 | int | TargetLanguageLcid | The LCID of the target language. |
5 | string | PartitionIndexes | A list of partition indexes separated by ;. |
6 | string | TaskTemplateGuid | The GUID of the task template. |
Return Values
Result | Type/Value | Interpretation |
Success | string | Contains the guid of the task. |
Error | 15 | Language does not exist. |
Error | 16 | Document does not exist. |
Error | 24 | Workflow does not exist. |
Error | 27 | Task template does not exist. |
Error | 53 | Task does not exist. |
Error | 180 | The document is not ready because it is being checked in. |
TaskManager.GetTaskProgress
Returns the progress of a task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
Return Values
Result | Type/Value | Interpretation |
Success | int | The progress of the task in percent. |
Error | 53 | Task does not exist. |
TaskManager.GetTaskState
Returns the state of a task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
Return Values
Result | Type/Value | Interpretation |
Success | int |
|
Error | 16 | Document does not exist. |
Error | 53 | Task does not exist. |
TaskManager.GetTaskStatistics
Returns the statistics of a task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
Return Values
Result | Type/Value | Interpretation |
Success | string | The statistics as an XML structure. See below for information on the exact structure. |
Error | 53 | Task does not exist. |
Error | 148 | Cannot load statistics. |
The returned XML structure has the following layout:
<?xml version="1.0" encoding="UTF-16"?> <TaskStatistics Type="[task template name" Description="[description of the task: project name, document name, percentage]" SourceLanguage="[source language name]" TargetLanguage="[target language name]" Deadline="[deadline date]" Translations="[amount of added translations]" SourceTerms="[amount of added source language terms]" TargetTerms="[amount of added target language terms]" TermEntries="[amount of added term entries]" AmountOfTime="[hours, minutes and seconds spent on this task]"/>
Date and time are formatted according to the current locale.
TaskManager.ImportTaskFromEru
Imports an ERU (External Processing Response Unit) file to a task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | string | InputFileName | The path to the input file. |
4 | string | ToolGuid | Guid of the external processing tool. Attention There must be a corresponding license for the tool. |
Return Values
Result | Type/Value | Interpretation |
Success | string | The GUID of the job. |
Error | 53 | Task does not exist. |
TaskManager.ImportXliffToTask
Imports an XLIFF file to a task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | string | InputFileName | The path to the input file. |
Return Values
Result | Type/Value | Interpretation |
Success | string | The GUID of the job. |
Error | 18 | Unable to create job. |
Error | 53 | Task does not exist. |
Error | 202 | You do not have a license for XLIFF import/export. |
Progress queries can be carried out via GetJobProgress. Status queries can be carried out via the GetJobStatus function.
TaskManager.IsTaskFinished
Returns whether a task is finished or not.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
Return Values
Result | Type/Value | Interpretation |
Success | int | 0 if the task is not finished and 1 if it is finished. |
Error | 53 | Task does not exist. |
TaskManager.SetTaskConfirmed
Sets a task to confirmed.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | bool | Confirmed | Specifies whether the task should be set to confirmed or not. |
Return Values
Result | Type/Value | Interpretation |
Success | ||
Error | 53 | Task does not exist. |
Error | 210 | Cannot confirm task. |
Error | 211 | Cannot unconfirm task. |
TaskManager.SetTaskDeadline
Sets the due date of a specific task.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | DateTime | Deadline | The date by which the task should be finished. |
Return Values
Result | Type/Value | Interpretation |
Success | Is always empty. | |
Error | 138 | Cannot set deadline. |
TaskManager.SetTaskFinished
Sets a task to finished or unfinished.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | bool | Finished | Specifies whether to set the task to finished or not. |
4 | bool | WithParents | Specifies whether the parent objects will also be considered or not.
|
Return Values
Result | Type/Value | Interpretation |
Success | Is always empty. | |
Error | 53 | Task does not exist. |
Error | 89 | Task cannot be finished. More detailed information can be found in the error description. |
Error | 112 | Is not ready to be finished. |
Error | 194 | Task cannot be unfinished. |
TaskManager.SetTaskProgress
Sets the task progress.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | int | TaskProgress | Sets the progress of the task. |
Return Values
Result | Type/Value | Interpretation |
Success | ||
Error | 53 | Task does not exist. |
TaskManager.SetTaskStartDate
Sets the start date of a task to the given date and time. Checks if date and time is allowed as a start date for the task.
- The start date of a task needs to be:
- the same or later than the creation date of a task
- earlier than the task's due date
- the same or later than the preceding task's due date
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | DateTime | StartDate | The new value for the start date. |
Return Values
Result | Type/Value | Interpretation |
Success | Is always empty. | |
Error | 53 | Task does not exist. |
Error | 227 | Cannot set start date. |
TaskManager.SwitchTaskParagraphState
Available from Across v7.0 15444.
Changes one paragraph state to another for the specified task. The task cannot be read-only, i.e. it needs to be ready for processing like when it is opened in the Across client.
Unlike LanguageManager.SwitchLanguageParagraphState, this function can switch the state of paragraphs when another task of the same target language is involved in a crossGrid package. Changed paragraphs will then no longer be overwritten, should the crossGrid package be uploaded again afterwards.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | TaskGuid | GUID of the task. |
3 | DateTime | OriginalStateGuid | The GUID of a paragraph state that should be replaced. The GUID can be obtained via the GetParagraphStateGuidByName function. Attention The paragraph state needs to be valid for the task. |
4 | string | TargetStateGuid | The GUID of a paragraph state that should replace the original one. The GUID can be obtained via the GetParagraphStateGuidByName function. |
Return Values
Result | Type/Value | Interpretation |
Success | int | The number of changed paragraphs. |
Error | 23 | Document extension is not supported. |
Error | 24 | Workflow does not exist. |
Error | 41 | The paragraph state does not exist. |
Error | 42 | Unable to set paragraph state. More detailed information can be found in the error description. |
Error | 53 | Task does not exist. |
Error | 180 | The document is not ready because it is being checked in. |
Error | 225 | The language content cannot be changed. |
Error | 241 | The paragraph state is not involved in the task. |
Error | 242 | The language cannot be loaded. |