2019.1

Table Of Contents
l
The My name is script looks for an element that has the ID:
hero
. Inside that element it looks for the text:
@name@
and replaces that with either the default name ("John Doe") or the name given in the URL.
l
The Year script puts the current year in the footer.
For more information about writing scripts, see: "Writing your own scripts" on page798.
Tip
You don't have to write a script yourself if you just want to insert some data directly into
the template. You could simply drag-and-drop the data on the template or use the Text
Script Wizard (see: "Variable Data" on page775).
The Workflow configuration
The project's Workflow configuration, Serving a Web Page.OL-workflow, contains just one
process. It is a simple OL Connect Web process (see "Web processes with OL Connect tasks"
on page207).
The NodeJS Server Input task's HTTP action is set to hello. This means that this process will
be invoked whenever someone tries to access the Workflow server with this URL: http://
{server's address}/hello.
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. If it wouldn't
be followed by another task, the Create Web Content task would not return its output to the
Workflow process, where it can be viewed (click View as HTML).
The data mapping configuration
When the browser sends the request to Workflow, the Workflow process starts and puts the
request into XML, including the values that were given in the URL. To extract those values from
the 'job file' (the XML) the process uses a data mapping configuration, made with the
DataMapper: WEB_HELLO Data.
Page 196