Data types

In the different SDK flows, you have to handle, when reading or writing, different Process 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 Process. These syntaxes will be followed by the different Process flows.

Simple types syntax

Texte type

<string name="DocumentState" value="En cours" />

Booléen type

<boolean name="ChampBoolean" 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

Full format

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

Short format

<user id="1" name="sys_Creator" />

Or

<user login="sysadmin" name="sys_Creator" />

Attachment type

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

IO upload flow

The IO 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="AttachmentFieldName" >
  <file name="AttachmentFieldName">
    <content name="BrokenLinksInWikis.pdf" guid="4nt9tu83nzw9qcsnnv5dwt" />
  </file>
</collection>

Conversion into Base64

Info

This mode is only available for the process documents and the data universe modules (“Workflow”).

<collection name="AttachmentFieldName" >
  <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 logic for “collection” type fields is to always have a “collection” node carrying the “name” of the property. Under this node, there is a collection of simple syntaxes depending on the type of data present in this collection.

Example of a multiple list field:

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

Table field

The table field is a resource collection:

<collection name="tableau" label="tableau">
	<resource>
		<header> ...
		</header>
		<body>...
		</body>
	</resource>
	<resource>
		<header> ...
		</header>
		<body>...
		</body>
	</resource>
 </collection>
Tip

Les bodys de chaque resource se comporte comme les champs dans le document principal. Le plus simple pour savoir ce qu’il faut passer pour la création est de créer un document avec tableau remplis dans l’UI et ensuite de lancer un flux “GET” sur le document.

Source : https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowsTypes