Import-Dokument und Import-Skript für Importszenario

Aus openM2-Wiki
Wechseln zu: Navigation, Suche

Import-Dokument:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- DOCTYPE IMPORT SYSTEM "m2.dtd" -->
<IMPORT ACTION = "ImportGroup.xml">
<OBJECTS>
  <OBJECT TYPECODE="Company">
    <SYSTEM>
      <ID DOMAIN="Company">12345</ID>
      <NAME>MUSTER GMBH</NAME>
      <DESCRIPTION></DESCRIPTION>
      <VALIDUNTIL>1.1.2050</VALIDUNTIL>
    </SYSTEM>
    <VALUES>
      <VALUE FIELD="legalForm" TYPE="CHAR">GmbH</VALUE>
      <VALUE FIELD="owner" TYPE="CHAR">Muster</VALUE>
      <VALUE FIELD="manager" TYPE="CHAR">mustermann</VALUE>
      <VALUE FIELD="mwSt" TYPE="INTEGER">20</VALUE>
    </VALUES>
  </OBJECT>
  <OBJECT TYPECODE="Adress">
    <SYSTEM>
      <ID DOMAIN="Adress">12345</ID>
      <NAME>MUSTER GMBH</NAME>
      <DESCRIPTION></DESCRIPTION>
      <VALIDUNTIL>1.1.2050</VALIDUNTIL>
      </SYSTEM>
    <VALUES>
      <VALUE FIELD="street" TYPE="CHAR">Dreiweg 9</VALUE>
      <VALUE FIELD="zip" TYPE="CHAR">6040</VALUE>
      <VALUE FIELD="town" TYPE="CHAR"></VALUE>
      <VALUE FIELD="mailbox" TYPE="CHAR"></VALUE>
      <VALUE FIELD="country" TYPE="CHAR"></VALUE>
      <VALUE FIELD="tel" TYPE="CHAR">039/445699</VALUE>
      <VALUE FIELD="fax" TYPE="CHAR">039/445698</VALUE>
      <VALUE FIELD="email" TYPE="CHAR">muster@adress.com</VALUE>
      <VALUE FIELD="homepage" TYPE="CHAR"></VALUE>
    </VALUES>
  </OBJECT>
  <OBJECT TYPECODE="Group">
    <SYSTEM>
      <ID DOMAIN="Group">22235</ID>
      <NAME>Gremium</NAME>
      <DESCRIPTION></DESCRIPTION>
      <VALIDUNTIL>1.1.2050</VALIDUNTIL>
    </SYSTEM>
    </OBJECT>
  <OBJECT TYPECODE="Group">
    <SYSTEM>
      <ID DOMAIN="Group">22234</ID>
      <NAME>Zentrale EDV</NAME>
      <DESCRIPTION></DESCRIPTION>
      <VALIDUNTIL>1.1.2050</VALIDUNTIL>
    </SYSTEM>
  </OBJECT>
  <OBJECT TYPECODE="Group">
    <SYSTEM>
      <ID DOMAIN="CNUserGroup">22233</ID>
      <NAME>Jeder</NAME>
      <DESCRIPTION></DESCRIPTION>
      <VALIDUNTIL>1.1.2050</VALIDUNTIL>
    </SYSTEM>
  </OBJECT>
</OBJECTS>
</IMPORT>

Import-Skript:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- DOCTYPE IMPORTSCRIPT SYSTEM "ImportScript.dtd" -->
<IMPORTSCRIPT NAME="ImportUserGroup" CUSTOM="Benutzer">
  <OBJECT TYPECODEREF="Benutzer">
    <OPERATION TYPE="change"></OPERATION>
    <CONTAINER TYPE="ID">0x0101330100000670</CONTAINER>
  </OBJECT>
  <OBJECT TYPECODEREF="Person">
    <OPERATION TYPE="change"></OPERATION>
    <CONTAINER TYPE="NONE"></CONTAINER>
  </OBJECT>
  <OBJECT TYPECODEREF="Firma">
    <OPERATION TYPE="change"></OPERATION>
    <CONTAINER TYPE="ID">0x01010021000008E9</CONTAINER>
  </OBJECT>
  <OBJECT TYPECODEREF="Adresse">
    <OPERATION TYPE="change"></OPERATION>
    <CONTAINER TYPE="NONE"></CONTAINER>
  </OBJECT>
  <OBJECT TYPECODEREF="Gruppe">
    <OPERATION TYPE="change"></OPERATION>
    <CONTAINER TYPE="ID">0x010134010000066E</CONTAINER>
  </OBJECT>
</IMPORTSCRIPT>