# Job-Definition

Um eine möglichst hohe Flexibilität anzubieten, findet die Konfiguration der Importjobs via XML statt. Die genauen Möglichkeiten schauen wir uns hier an der mitgelieferten Musterdatei ImportDokumente.xml an.

{% hint style="info" %}
**XML Know-How**

Die Definition setzt Basiswissen im Bereich von XML voraus. Sollten Sie nicht über das notwendige Know-how verfügen, helfen wir Ihnen gerne bei der Definition des gewünschten Import-Jobs weiter.
{% endhint %}

{% code overflow="wrap" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<DocumentImporter>
  <Login UserName="Administrator" Password="dD4zFVuHYv1x40L7GRCNbg==" ServerName="MyAppServer" Database="GenesisWorldDB"/>
  <Directory name="c:\Projects\Artwin\DocImportDir\">
    <Actions>
      <Action type="DeleteFile" event="OnSuccess"/>
      <Action type="MoveFile" event="OnFailure">".\\Error\\"</Action>
    </Actions>
    <DocumentFields>
      <DOCDATE>GetFileDate()</DOCDATE>
      <DOCNUMBER>GetFileName().Split('_', '.')[2]</DOCNUMBER>
      <KEYWORD>"Bestellung Nr. " + GetFileName().Split('_', '.')[2]</KEYWORD>
      <CATEGORY>"Bestellung"</CATEGORY>
      <OWNERNAME>"Alle (öffentlich)"</OWNERNAME>
    </DocumentFields>
    <Version type="NewDocument"/>
    <Links>
      <Link object="ADDRESS" attribute="ITDDOCADR">
        <Filter>"ADRNUMBER = '" + GetFileName().Split('_', '.')[0] + "'"</Filter>
        </Link>
        </Links>
  </Directory>
</DocumentImporter>
```

{% endcode %}

Nachfolgend erläutern wir Ihnen die einzelnen Elemente und Funktionen.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.artwin.ch/dokumentimporter/dokumentation/job-definition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
