# Data Transfer Engine (Engine `dtr`)

This engine contains jobs for calling the data transfer server (MS-Office data transfer, server-side).

> **Important:** Since the data transfer server uses MS Office, the application server must not run under the local system account, but must use a user account for login.

> **Note:** The default language for the server-side call of the data transfer server is `German`.
The language can be configured for the enaio® server via the following registry entry:

```text
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OPTIMAL SYSTEMS\MS-Office-Anbindung\OS:4.xOffice-Utilities\
```
There, create the DWORD value `Language` with the language-specific value.

* [dtr.SynchronizeData](dtr.md#dtr.SynchronizeData)

<a id="dtr.SynchronizeData"></a>

## dtr.SynchronizeData

Server-side data import into template files.
This job fills an MS-Office template file with the index data of the specified object.
The template file can be passed either via alias name (`TemplateAlias`) or directly as a file.

### Input Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Flags` | INT | Yes | Currently not supported — pass `0`. |
| `ObjectType` | INT | Yes | Type of the object |
| `ObjectID` | INT | Yes | ID of the object |
| `[TemplateAlias]` | STRING | No | Name of the template to be filled with existing index data.<br>Alternatively, the template file can be passed directly via the input file list. |

### Input Files

| Name | Description |
|---|---|
| [File list] | Name and path of the template file — alternative to `TemplateAlias` |

### Output Files

| Name | Description |
|---|---|
| [File list] | Name and path of the filled document |

### Return Value

(INT): 0 = Job successful, otherwise error code.

### Monitoring

Server-side data import can be monitored via `oxvbww2servermonitor.exe` from the `\server\` directory.
The application terminates the data import and the associated Office application in case of error.

Configuration via `oxvbww2servermonitor.exe.config`:

| Key | Description |
|---|---|
| `<add key="prozesskill" value="" />` | Period in seconds after which the data import is terminated. `0` = function disabled. |
| `<add key="emailto" value="" />` | Email address to which an email is sent in case of error. Empty = no email. |
| `<add key="emailfrom" value="" />` | Email sender |
| `<add key="subject" value="" />` | Subject of the email |
| `<add key="body" value="" />` | Body of the email |
| `<add key="log" value="" />` | `1` = error log is written; `0` = not written |
| `<add key="logfile" value="" />` | Label and path for the log |
| `<add key="waitprocess" value="" />` | Period in seconds after which the Office application is terminated |
| `<add key="prozessname" value="" />` | Label of the Office application to be terminated (e.g., `WINWORD`) |
