2022.2

Table Of Contents
Tip: StoretheformIDinatextfileordatabasealongwiththeorderIDand/orGUID.This
makesitpossibletofindanddeletetheform(usingthecotg deletenode)whenformdata
issubmitted.
Serving the form
AssoonasaCOTGappusertapsabuttontodownloadanewform,thesecondflowspringsintoaction
toservetherequestedCOTGform.
l
Thehttp innodereceivestherequestfromtheCOTGapp.
l
Achangenodecanbeusedtoconstructthepathtotheformfile(see"Concatenatingstrings"on
page188)andstoreitinmsg.filename.
l
Thefilenodereadsthefilefromthelocationgiveninmsg.filename.Theformdataisreturned
inmsg.payload.
l
Thehttp responsenodesendstheresponsebacktotherequestreceivedfromthehttp innode.
Itisrecommendedtoaddacatchnodetocatchanyerrorsthrownbythefilenodeandreturntheapplic-
ableerrorcodetothebrowser.
Althoughitispossibletodesigntheflowtoproducetheformondemand,thiscannegativelyaffect
responsetimebecausethetemplatemustbemergedwithdatafirst.
Processing received data
ThelastrequiredflowinaCaptureOnTheGosolutionwillhaveanhttp innodesetuptoreceivedata
fromtheCOTGapp.
Thedatamaybeprocessedinavarietyofways,asrequired.
InordertomaketheCOTGappdeletetheformfromthedevice'slibraryuponsuccessfultransmission
ofthedata,theflowmustreturnstatuscode291viathehttp responsenode.
The DataMapper
TheDataMapperisthetooltocreateadatamappingconfiguration.Datamappingconfigurationsare
usedtoextractdataandtransposethatdataintoaformatthatcanbesharedamongstdifferentlayouts
andoutputscreatedwiththeOLConnectDesignerandWorkflow.
Theoriginaldata,locatedinafileordatabaseoutsideofOLConnect,iscalledadatasource.
Thefirststepinthedataextractionprocessismakingsettingsfortheinputdata(see"Datasourceset-
tings"onpage223),includingboundariesforeachrecordinsidethedatasample.Whenyoudefinethe
boundaries,youareactuallydefiningaseriesofrecordsinsideyourdatasamplefile.
Afterconfiguringthesesettingsyoucanstartworkingonthelogictoextractdatafromeachofthose
records.Youneedtoidentifyandextractdatafromeachrecord.Toachievethis,youwillcreateadata
Page 198