2022.2

Table Of Contents
l
TheSet Job Infos and Variablestaskreadsdatafromthe(currentrecordinthe)Metadataand
putsthemintovariables.
l
TheCreate Web ContenttaskmergestherecordwiththeCOTGTimesheetFormtemplate.
l
TheSend to FoldertasksavestheformtotheFormsfolderintheprojectfolder,usingthevalue
ofonevariableasthefilename.
l
Finally,theOutput to Capture OnTheGotasksendsinformationabouttheformtotheCOTG
Server.Double-clickthetasktoseehowvariablesareusedinitssettings.
TheDeletetaskisanOutputtaskthatdoesnothing,actually;itdoesn'tevenremoveanything.
However,thisstepisusefulwhenrunningtheprojectstepbystepinDebugmode.Taskswillonly
returntheiroutputtotheprocess-whereitcanbeviewed-aslongastheyarefollowedbyanother
task.
Serving a form
Whentheuserchoosestodownloadaformintheapp,theappsendsarequestusingtheURLthatwas
setfortheforminthepropertiesoftheOutputtoCaptureOnTheGotask(ontheDeposittab).TheURL
containsoneparameter:auniqueID.
Thecotg_ts_serve_formprocessreceivestherequestandloadstheform(ifitexists).TheLoad
ExternalFiletaskreplacesthejobfilewiththeform.AttheendoftheprocesstheServerInputtask
returnsthejobfile(theform)totheapp.
Capturing data and generating output
Whentheusersubmitsaform,thecotg_ts_capture_dataprocesswritesthejobfile-therequestin
theformofXML-toaTempfolderintheWorkspaceandsendsaresponsecodetotheapp.Thisway
thereisnoneedfortheCOTGusertowaitwhileoutputisbeinggenerated.Theresponsetotheapp
canbesentrightaway.
Thecotg_ts_generate_reportprocesspicksuptheXMLfilefromtheTempfolder,convertsittoJSON
andsavesittoaJSONfile.NotehowtheBranchtaskkeepsabackupofthejobfile.Itisthebackup
file-theXML-thatishandeddowntothenextBranch,whereitissavedasanXMLfile.
Finally,theprocessextractsdatafromthejobfileandmergesthemwiththeCOTGTimesheetReport
template,generatingaPDF.
AlloutputfilesarestoredintheWorkspace\Outfolder
Customizingtheproject
AprojectisagreatstartingpointforbuildinganOLConnectsolution.Thispartexplainshowtomake
changestotheproject.
Page 145