Resume

In the different SDK flows, you have to handle, when reading or writing, different VDoc types: text, date, time, user, attachments, etc. The syntax for these types in JSON or XML flows is not necessarily obvious.

This article aims to list the different XML syntaxes for each data type of VDoc. These syntaxes will be followed by the different VDoc flows.

Simple types syntax

String type

    <string name="DocumentState" value="In progress" />

Boolean type

    <boolean name="BooleanField" value="true" />

Date type

    <date name="sys_CreationDate" value="2011-12-23T16:12:52.773Z" />

Decimal type

Integer type
    <integer name="IntegerField" value="0" />
Float type
    <float name="FloatField" value="0" />
long type
    <long name="LongField" value="0" />
Double type
    <double name="DoubleField" value="0" />
Big decimal type
    <big-decimal name="Big-decimal" value="0" />

Period type

    <period name="PeriodColumn">
        <start-date value="2009-09-03T00:00:00.000Z" display-value="03/09/2009" />
        <end-date value="2009-09-04T00:00:00.000Z" display-value="04/09/2009" />
    </period>

Map type

<map name="MapName">
    <map-entry name="MapEntryName1">
       <string value="KeyValue1" />
       <string value="EntryValue1" />
    </map-entry>
    <map-entry name="MapEntryName2">
        <string value="KeyValue2" />
        <string value="EntryValue2" />
    </map-entry>
…
</map>

Person/Role type

Short format
    <user id="1" name="sys_Creator" />
    
    or
  
    <user login="sysadmin" name="sys_Creator" />
Full format
    <user email="" first-name="System" id="1" last-name="Administrator" login="sysadmin" name="sys_Creator" />

Attachment type

In distant flow calls, attachments can be uploaded in different ways.

Passing by the IO upload flow

The upload flow allows to send a file to the server and retrieve an identifier ("guid"). This "guid" can then be reused in a create or an update flow.

<collection name="AttachmentCollectionName">
    <file name="AttachmentFieldName">
        <content name="BrokenLinksInWikis.pdf" guid="4nt9tu83nzw9qcsnnv5dwt" />
    </file>
</collection>
Passing by a conversion into Base64

This mode is only available for the process documents and the data stockrooms modules ("Workflow").

<collection name="AttachmentCollectionName" >
    <file name="AttachmentFieldName">
        <content name="BrokenLinksInWikis.pdf" data="JVBERi0xLjQKJaqrrK0KNCAwIG9iago8PA..." />
    </file>
</collection>

Linked resource type

 <collection name="DynamicTable" label="Dynamic Table">
    <resource>
        <header id="101" protocol-uri="uri://vdoc/resource/101" creator="sysadmin" created-date="2015-12-07T14:27:42.000Z" editor="sysadmin" modified-date="2015-12-07T14:27:42.000Z">
            <created-by id="1" protocol-uri="uri://vdoc/user/1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" />
            <modified-by id="1" protocol-uri="uri://vdoc/user/1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" />
            <organization id="1" name="DefaultOrganization" label="Default organization" protocol-uri="uri://vdoc/organization/1" path="DefaultOrganization" />
            <project id="51" name="STAB" label="STAB" protocol-uri="uri://vdoc/project/51" />
            <resource-definition id="161" name="ASPOSETABLE" label="ASPOSE Table" protocol-uri="uri://vdoc/resourceDefinition/161" />
            <catalog id="82" name="AsposeGroup" label="Aspose group" protocol-uri="uri://vdoc/catalog/82" is-confidential="false" is-system="false" type="0" />
        </header>
        <body>
            <date name="sys_CreationDate" value="2015-12-07T14:27:42.000Z" />
            <date name="sys_ModificationDate" value="2015-12-07T14:27:42.000Z" />
            <float name="Number" value="1.0" />
            <string name="Artist" value="Alphonse" />
            <string name="Title" value="Jazz is everything" />
            <string name="Category" value="music" />
            <user name="sys_ModifiedBy" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" protocol-uri="uri://vdoc/user/1" />
            <user name="sys_Creator" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" protocol-uri="uri://vdoc/user/1" />
        </body>
    </resource>
    <resource>
        ...
    </resource>
    
</collection>    

Collections syntax

The logical for fields of type "collection" is to always have a "collection" node with the property "name". Under this node, there is a collection of simple syntaxes depending on the data type in this collection.

Example: a multiple list field

<collection name="MultipleListField">
    <string value="value 1" />
    <string value="value 2" />
</collection>