dms.XMLDelete

This job deletes the specified object. Folders, cabinets or documents can be deleted. Fundamentally, there are two types of deletion distinguished by the option HARDDELETE:

  • 'Physical delete': The object is completely deleted, i.e. not moved to the trash bin. If the object is a document, all its files are also removed from the server.

  • 'Delete to trash bin': The object is not physically removed, but is located in the trash bin afterwards and can be restored from there.

An object can have subobjects (e.g. a folder contains documents). This object cannot be deleted if not all its subobjects are deleted. This is controlled by the option DELETECASCADING.

Deleting objects assigned to a workflow process is not possible. For the case where a document has multiple locations, the job generally removes the document from all its locations. However, it is also possible to remove the document from exactly one such location. For this, the parent attributes (registerid, register-type or folderid) must be set in the object element. This now represents the location of the document to be removed.

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. HARDDELETE=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. Return Value

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

No job-specific return values.

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.
XML for deleting a folder
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
  <Archive id="-1" internal_name="press_archive">
    <ObjectType internal_name="press_archive_folder" type="FOLDER" id="-1">
      <Object object_id="214"/>
    </ObjectType>
  </Archive>
</DMSData>
XML for deleting a cabinet
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
  <Archive id="-1" internal_name="press_archive">
    <ObjectType type="REGISTER" internal_name="file_register" id="-1">
      <Object object_id="229"/>
    </ObjectType>
  </Archive>
</DMSData>
XML for deleting a document
<?xml version="1.0" encoding="UTF-8"?>
<DMSData>
  <Archive internal_name="press_archive" id="-1">
    <ObjectType internal_name="word_documents" maintype="4" cotype="0" type="DOCUMENT" id="-1">
      <Object object_id="214" variantparent_id="-1"/>
    </ObjectType>
  </Archive>
</DMSData>