Search

 

Module: Editor

Version: 4.3.0 +

Category: DataStore

 

Description

With the VisionReference 'GetDataItemHierachy' it is possible to retrieve the full hierarchy of a dataitem and its children.

Dataitems can be stored hierarchical in Vision, which entails that a dataitem can have multiple children, and these can have multiple children too, etc. The retrieval of a full hierarchical tree can be achived by a single call to this formula, instead of repeated invocations of GetDataItems and GetDataItem to construct the hierarchy manually.

In order to retrieve the hierarchy, only a single dataitems identifier needs to be supplied, to get its data and all it's (grand)childrens data. The response for this formula looks like this example containing a dataitem, with 3 descendant dataitems, of which the last one has a descendant dataitem of its own.

Parameters

DataItemID:

The unique indentifier for the dataitem that has to be retrieved

Response

Format

The retrieved info will look like this:

<response xmlns="http://www.actuit.nl/futurama/vision/service/response/1.0">
    <resultcode code="00000" success="true">
        <description>Success</description>
    </resultcode>
    <result xsi:type="GetDataItemResult" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <date>2012-03-29T10:47:00.9459773+02:00</date>
        <description></description>
        <xml></xml>
        <descendantcount>3</descendantcount>
        <descendants>
            <descendant>
                <description></description>
                <xml></xml>
                <descendantcount>0</descendantcount>
            </descendant>
            <descendant>
                <description></description>
                <xml></xml>
                <descendantcount>0</descendantcount>
            </descendant>
            <descendant>
                <description></description>
                <xml></xml>
                <descendantcount>1</descendantcount>
                <descendants>
                    <descendant>
                        <description></description>
                        <xml></xml>
                        <descendantcount>0</descendantcount>
                    </descendant>
                </descendants>
            </descendant>
        </descendants>
    </result>
</response>

Here every single found dataitem in the hierarchy has the following fields:

  • Description: A small text describing the dataitem.
  • XML: The data contained with the dataitem.
  • DescendantCount: The number of dataitems that are linked to this dataitem.
  • Descendants: The dataitems that are linked to this dataitem.

Return codes

The possible return codes are as follows:

  • 00000 - GeneralSuccess: The operation completed successfully.
  • 01000 - GeneralFailError: The operation caused an error. See the error log of the Vision Management Site for more details.
  • 01999 - GeneralFailError: The operation caused an error. See the error log of the Vision Management Site for more details.
  • 51101 - DataStoreItemNotAvailable: Tje dataitem cannot be found or retrieved.
  • 51102 - DataStoreItemTypeTooNew: Type version of data item is newer than type version of DataSet.
  • 51104 - DataStoreItemInvalidXML: The dataitem contains invalid XML data.

Example soapUI message

In the preceding paragraph the parameters of the VisionReference are listed. The values of these parameters are used by Futurama to compose an XML-message. With soapUI it is possible to see the responses depending on the values of the parameters. Below you find an example of an XML-message. This example can be used in your soapUI project to test the connection with Vision and to see the response for a certain combination of parameters.

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.actuit.nl/futurama/vision/service/header/1.0" xmlns:ns1="http://www.actuit.nl/futurama/vision/service/request/1.0">
	<soapenv:header>
		<ns:document path="\\servername\path\datastore.xml" version=""/>
		<ns:futurama path="\\servername\path\futurama" version=""/>            
	</soapenv:header>
	<soapenv:body>
		<ns1:request module="DataStore" version="1.0" method="GetDataItemHierarchy">
			<ns1:parameter name="DataItemID" value="1" type="System.Int32"/>
		</ns1:request>
	</soapenv:body>
</soapenv:envelope>

Within the Header element you find an element 'Document' and an element 'Futurama'. For these elements you have to fill in the path of the Document and the Futurama respectively you also configured in the Apps and Futuramas tab of the Vision Management Site. Within the Request element you find the parameters for this VisionReference. By changing the values of these parameters you can execute different webservice calls.

Related Topics

- DeleteDataItem: for deleting a single DataItem

- DeleteDataItemHierarchy: for deleting a hierarchial tree with DataItems

- DeleteDataItems: for deleting all the DataItems for a person, or deleting all the DataItems in a certain DataSet

- GetDataItem: for getting the content of a single DataItem

- StoreData: for storing Xml data in the Vision application

- GetDataItems: for getting the DataItems from a person, or the DataItems from a certain DataSet

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2013-05-07