dms.XMLInsert

This job inserts an object into enaio®. A folder, cabinet or document can be inserted. The return parameter 'ObjectID' corresponds to the ID of the added object or is -1 if the job failed. If the object to be inserted is a document and it should have files to be transferred to the archive server, the input file list should be filled with the corresponding file path specifications. Dias can also be transferred this way. If more than one dia is transferred, only the first dia from the list is inserted at the archive server. The location of the new object must be entered in the XML object element in the case of a document or cabinet. If only the cabinet ID is entered here, the cabinet type and archive are automatically determined. However, for performance reasons, these values should always be specified.

1. Input Parameters

Name Type Required Description

Flags

INT

Yes

general options for the job (see Flags)

Options

STRING

Yes

semicolon-separated job options (e.g. ARCHIVABLE=1;CHECKACCESS=0) (see Parameter Options)

XML

BASE64

Yes

contains object description in XML format (see DMSData XML Format and the parameter XML)

JobUserGUID

STRING

Yes

determines the user context (see the parameter JobUserGUID)

2. Input Files

Name Description

[FileList]

Path and name of the documents to be inserted

File_N

(STRING) Nth file path as alternative to file list

3. Output Parameters

Name Type Dependency Description

ObjectID

INT

new object ID, if job successful, otherwise -1

ObjectType

INT

type of the object, otherwise -1

4. Output Files

Name Description

[FileList]

Path and name of the XML file with errors (see Flags)

5. Return Value

(INT): 0 = Job successful, otherwise error code
Complete list of error codes

The following XML examples always contain all tags and tag attributes that can be used for the respective action. Unused tags or attributes can naturally be omitted.
If important attributes such as e.g. maintype, register_id, register_type or system are not needed, they should either be omitted entirely, set to '0' or '-1', depending on functionality.
The following example with the '<TableFields/>' tags only works if a table is located in the tagging mask for the archive.
The following example with the '<TableFields/>' tags only works if a table is located in the tagging mask for the cabinet.
The following example with the '<TableFields/>' tags only works if a table is located in the tagging mask for the document.
XML for inserting a folder into an archive
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
  <Archive id="-1" internal_name="press_archive">
    <ObjectType id="-1" internal_name="press_archive_folder" type="FOLDER">
      <Object>
        <Fields>
          <Field internal_name="subject_area">Softwareentwicklung</Field>
          <Field dbname="feld2">Testbenutzer</Field>
        </Fields>
        <TableFields>
          <TableField dbname="Tabelle">
            <Row>
              <Field internal_name="designation">Dokumentation</Field>
            </Row>
          </TableField>
        </TableFields>
        <Remarks>
          <RemarkText action="INSERT" color="WHITE">Here a note can be stored.</RemarkText>
          <RemarkObject action="INSERT" object_id="123" object_type="196616">Link note</RemarkObject>
        </Remarks>
      </Object>
    </ObjectType>
  </Archive>
</DMSData>
XML for inserting a cabinet
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
  <Archive id="-1" internal_name="press_archive">
    <ObjectType id="-1" internal_name="year_2004" type="REGISTER">
      <Object folder_id="228">
        <Fields>
          <Field internal_name="category">Neuentwicklung</Field>
          <Field osguid="BDED8A3C99E64AD2A4ECBFDB586">öffentlich</Field>
        </Fields>
        <TableFields>
          <TableField internal_name="table_topics">
            <Row>
              <Field internal_name="topic">Dokumentenmanagement</Field>
            </Row>
          </TableField>
        </TableFields>
        <Remarks>
          <RemarkText action="INSERT" color="WHITE">A note for the cabinet.</RemarkText>
          <RemarkObject action="INSERT" object_id="234" object_type="196616">Link note</RemarkObject>
        </Remarks>
      </Object>
    </ObjectType>
  </Archive>
</DMSData>
XML for inserting a document
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
  <Archive id="-1" internal_name="press_archive">
    <ObjectType id="-1" maintype="4" cotype="0" internal_name="word_documents" type="DOCUMENT">
      <Object object_id="-1" register_id="78" register_type="0" variantparent_id="-1" maintype="0">
        <Fields>
          <Field system="0" internal_name="author">Testuser</Field>
        </Fields>
        <MultiFields>
          <MultiField system="0" osguid="2AED8A3399EE778DS4ECBFDB582">
            <Page id="1">
              <Value>345</Value>
            </Page>
            <Page id="2">
              <Value>123</Value>
            </Page>
          </MultiField>
        </MultiFields>
        <TableFields>
          <TableField name="Tabelle">
            <Row>
              <Field name="Team">Development</Field>
              <Field internal_name="feld2">
Status: released</Field>
            </Row>
          </TableField>
          <TableField osguid="AAED8A3C99EED78DS4ECBFDB586">
            <Row>
              <Field dbname="fd1">Year 2004</Field>
            </Row>
          </TableField>
        </TableFields>
        <Remarks>
          <RemarkText action="INSERT" color="BLUE">A note for the document.</RemarkText>
          <RemarkObject action="INSERT" object_id="432" object_type="196616">Link note</RemarkObject>
        </Remarks>
      </Object>
    </ObjectType>
  </Archive>
</DMSData>