XML Document |
Top Previous Next |
Below is an annotated example of the XML document produced when a document is finalized and leaves a flow. This document has a subid based on the sequenced flow ID (i.e. APApproval*). When a flow is finalized, the "finalize" script code has a template variable subdoc$ that has property information for this XML document, so you can retrieve the actual XML with a library object 'getimage()' method.
The root node is /docflow, with a flowid attribute of the flow ID name. <docflow flowid="TwoStep">
The /docflow/primary node contains the identification of the source image file that originally started the flow. <primary> <library>/u0/unform100/arc/demo_sales</library> <doctype>Order</doctype> <docid>0001139</docid> <subid>@unform</subid> </primary>
The /docflow/started and /docflow/completed nodes contain date/time information in yyyy-mm-dd hh:mm format (24-hour clock). <started>2018-07-25 07:32</started> <completed>2018-07-25 00:18</completed>
The /docflow/fields node contains subnodes for each field defined in the flow. A type attribute defines the type of field. Grid types include are further defined with /rows, /rows/row, and /rows/row/col tags. <fields> <InitialReview type="longtext"/> <ReadyToGo type="checkbox">1</ReadyToGo> <CustomerID type="lookup"/> <gridtest type="grid"> <rows> <row> <col name="one">1</col> <col name="two">Row 1</col> </row> <row> <col name="one">2</col> <col name="two">Row 2</col> </row> </rows> </gridtest> <toGoogle type="link">https://google.com?asdf</toGoogle> <message type="message">Some message text for the user.</message> </fields>
The /docflow/notes node contains one or more note tags, each with date and who attributes, and with the value of the note entered by the user. <notes> <note date="20180728-073208" who="admin">note 1 </note> <note date="20180728-073213" who="admin">note 2 </note> </notes>
The /docflow/updatehist node contains a series of /docflow/updatehist/update nodes, each with /docflow/updatehist/update/when, ../who, and ../what tags describing what edit took place. <updatehist> <update> <when>2018-07-25 07:33:04</when> <who>admin</who> <what>Annotation added or deleted</what> </update> <update> <when>2018-07-25 07:33:13</when> <who>admin</who> <what>Updated field(s) ReadyToGo</what> </update> <update> <when>2018-07-25 07:33:13</when> <who>admin</who> <what>Moved to step FinalReview</what> </update> <update> <when>2018-07-25 07:33:15</when> <who>admin</who> <what>Updated field(s) ReadyToGo</what> </update> <update> <when>2018-07-25 07:33:16</when> <who>admin</who> <what>Flow completed</what> </update> </updatehist>
The /docflow/attachments node contains two types of nodes. One is a series of /docflow/attachments/file nodes with a subid attribute, indicating what subid in the original parent document contains the image of the attachment. The value of each file node is the file title. The second is a series of /docflow/attachments/link nodes, with values of the library, doctype, docid, and subid of the linked image, separated by pipes. <attachments> <file subid="upload-00001">Invoice 0005199.pdf</file> <link>/u0/unform100/arc/demo_sales|Order|0001134|TwoStep</link> </attachments>
The /docflow/annotation node contains two types of subnodes. One /docflow/annotation/subid has the annotation image subid as its value. You can use this to retrieve the annotated image using the library object. In addition, there are multiple /docflow/annotation/mark nodes, each with a seq attribute, and datetime, username, and location subnodes. The location subnode has attributes for latitude and longitude if the browser provided this information (this feature requires user permission and a secure connection to the UnForm server using a public SSL certificate). Each mark node represents one drawn element on the annotation. The annotated version of the image (generally a PDF file) has these marks drawn and footnoted, so you can correlate the mark seq attributes with each mark on the PDF. The PDF files also have popup legends for these marks. Annotation marks are captured in sets, so the datetime value can be used as a reference for a set of marks drawn by one person in one annotation session. The location attributes will contain latitude and longitude if the drawing device (phone, tablet, etc.) allows it.
<annotation> <subid>twostep-signed</subid> <mark seq="1"> <datetime>2018-07-25 07:32:56</datetime> <username>Administrator</username> <location longitude="0" latitude="0"/> </mark> <mark seq="2"> <datetime>2018-07-25 07:32:58</datetime> <username>Administrator</username> <location longitude="0" latitude="0"/> </mark> <mark seq="3"> <datetime>2018-07-25 07:33:01</datetime> <username>Administrator</username> <location longitude="0" latitude="0"/> </mark> <mark seq="4"> <datetime>1969-12-31 17:00:00</datetime> <username/> <location longitude="0" latitude="0"/> </mark> </annotation> </docflow> |