As mentioned, the elements have various exits that make it possible to connect the elements to each other. These exits are defined in the element declaration files. For an example, take a look at
elements/guess.xml, where two exits, "start" and "success", are defined.
The relationships between the three elements, Start, Guess and Success, are defined in the site file,
sites/numberguess.xml. It's there that elements are linked together and that the flow of the site is defined. All this is done by the appropriate
Example 3.3. Defining flowlinks
<site> <element id="Guess" file="guess.xml" url="/guess"> <flowlink srcexit="start" destid="Start"/> <flowlink srcexit="success" destid="Success"/> </element> </site>
This particular element, GUESS, has one link to the START element and one to the SUCCESS element. A flow link is always connected between an exit of an element and an element, and the exits of each element must be specified in the element's definition file.
The benefit of all this is that it's easy to get a clear overview of the relationships and flow between elements in a site just by looking at the site file. This is a great advantage when developing and maintaining web applications, especially big ones.