2022.2

Table Of Contents
Serverortoanotherserver"onpage419)orinastartupflow(see"OLConnectStartupflow"on
page189).
Capture OnTheGo flows in Node-RED
CaptureOnTheGoisanOLConnectsolutionthatallowstocreateandsenddigitalformstotheCOTG
App(iOS,AndroidorWindows10)andprocessesanydatathatisreturnedbytheappafteraformhas
beenfilledout.
ACaptureOnTheGosolutiontypicallyconsistsofthreebasicflows.
l
TheflowthatmakesadocumentavailabletoCOTGAppusers.
l
TheflowthatrepliestodocumentrequestsfromCOTGAppusers.
l
TheflowthatreceivesdatafromCaptureOnTheGoAppusers.
ACaptureOnTheGoRepositoryIDandpasswordarerequiredinordertoconfiguretheCOTGnodein
theseflows.
Making a form available to COTG app users
TheflowthatcreatesandpublishesCOTGformswillusuallyhavethefollowingnodes.
l
Typicallythetriggerwillbeanendpointsetupusingthehttp innode,buttheflowcouldalsobe
triggeredbyaninputnodeliketheOLConnectcapture foldernode,thestandardwatchnodeor
thethird-partywatch-directorynode(see"NodesusedinOLConnectflows"onpage185).
l
Inordertocreateapersonalizedformordocument,incomingdatamustbeprocessed.
Oncethedatafileisreceived,thedata mappingnodeuploadsittotheConnectServerandsub-
sequentlyextractsthedatausingadatamappingconfiguration.ItoutputsadatasetIDin
msg.dataSetId.
l
Thedata getnoderetrievestherecordsfromthedatabaseusingthedatasetID.Itstoresthe
retrieveddatarecordsinanarrayonmsg.payload.
l
Node-RED'ssplitnodecanbeusedtoiterateovertherecords.Ineachiterationtherecordval-
uesofasinglerecordarewrittentomsg.payload.
l
Achangenodesetsanymsgpropertiesthatthefilenodeandthecotg publishnodeneed,such
astheorderID,customername,COTGaccountandthefilenameoftheform.
l
OLConnect'shtml contentnodetakestherecordIDinmsg.payloadasitsinputandrenders
theform.ItoutputstheHTMLtomsg.payload.
l
ThefilenodewritestheHTMLcontentinmsg.payloadtodisk.
l
Thecotg publishnodeinformstheCaptureOnTheGoServerthatanewdocumentisavailable
fordownload.ThenodereturnstheIDoftheformontheCOTGserverinmsg.documentId.
Page 197