2022.1

Table Of Contents
Serving the form
As soon as a COTG app user taps a button to download a new form, the second flow springs
into action to serve the requested COTG form.
l The http in node receives the request from the COTG app.
l A change node can be used to construct the path to the form file (see "Concatenating
strings" on page208) and store it in msg.filename.
l The file node reads the file from the location given in msg.filename. The form data is
returned in msg.payload.
l The http response node sends the response back to the request received from the http
in node.
It is recommended to add a catch node to catch any errors thrown by the file node and return
the applicable error code to the browser.
Although it is possible to design the flow to produce the form on demand, this can negatively
affect response time because the template must be merged with data first.
Processing received data
The last required flow in a Capture OnTheGo solution will have an http in node set up to
receive data from the COTG app.
The data may be processed in a variety of ways, as required.
In order to make the COTG app delete the form from the device's library upon successful
transmission of the data, the flow must return status code 291 via the http response node.
Page 220