2021.2

Table Of Contents
l Most of the scripts in the Thank you folder directly insert data that were submitted via the
Web form; see "Inserting variable data directly (drag-and-drop)" on page806.
l The Snippets script (also in the Thank you folder)loads two snippets, depending on the
values of two data fields (see "Loading a snippet via a script" on page904). Note that it
selects the table, in order to insert the snippet after the table (via results.after();
see "after()" on page1371).
l The Year script puts the current year in the footer of both Web pages.
For more information about writing scripts, see: "Writing your own scripts" on page877.
The Workflow configuration
The project's Workflow configuration contains just one process: an OL Connect Web process
(see "Web processes with OL Connect tasks" on page188).
Its NodeJS Server Input task has two HTTP Action entries: form and thank_you. This means
the process will be triggered when the server receives a request that ends with either /form or
/thank_you.
The request is saved to an XML file, which becomes the job file.
The Text Condition task checks if the request's header is thank_you. (For the function that is
used to read the header from the job file, see: XML data selections.)
If it is, the tasks in the branch run. The submitted data are merged with the thank_you Web
section and saved in Workflow's Data Repository.
Otherwise the main branch renders and returns the web form.
Note how the Section setting in the Create Web Content tasks determines which web page is
outputted (double-click the task to open the properties).
The Delete task is an Output task that does nothing, actually; it doesn't even remove anything.
However, this step is useful when running the project step by step in Debug mode. When it is
followed by another task, the Create Web Content task returns its output to the Workflow
process, where it can be viewed (click View as HTML).
The data mapping configuration
To extract the submitted data from the job file (the request XML), the process uses the data
mapping configuration: WEB_FORM Data.
To open it, select File > Open from the menu and browse to the Configurations\Resources
folder.
Page 171