...
A condition
can be added to a story (or inbox) frame; the associated event will only be executed if this condition is fulfilled. For now, the only supported condition is one based on a forecast published by the user. A condition must be specified according to:
Type
type
must be equal to "Forecastforecast",ColumnId
columnId
is a reference to a column in the forecast table (see below), usually a parameter,RowId
rowId
is a reference to a row in the forecast table (see below), usually a location,Operator
operator
is one of "lt" (less than), "gt" (greater than), "le" (less than or equal to), or "ge" (greater than or equal to), andValue
value
is the reference value to compare to.
An example in which a condition is used:
Code Block | ||||
---|---|---|---|---|
| ||||
<Frame><frame> <Title>condition<title>condition example</Title>title> <Start<start date="2008-03-13" time="00:01:00"/> <Stop<stop date="2008-03-13" time="00:02:00"/> <Popup>true<<popup>true</Popup>popup> <Condition><condition> <Type>Forecast<<type>forecast</Type>type> <ColumnId>water<columnId>water_level</ColumnId>columnId> <RowId>Lowestoft<<rowId>Lowestoft</RowId>rowId> <Operator>ge<<operator>ge</Operator>operator> <Value>300<<value>300</Value>value> </Condition>condition> <File>emergency<file>emergency_telephone_call.txt</File>file> </Frame>frame> |
An event can be associated with a story frame by specifying the File
file
key. Depending on the file type, a suitable application is started for displaying the file (e.g. a pdf-file is displayed in Adobe Reader and the contents of a txt-file is displayed in a message dialog window). The File
- file
key has an optional language attribute lang
that behaves the same as for the Title
title
keys.
Apart from a File
file
, an event for the story frame may also be a Message
message
. For such a message, no file has to be added to the scenario/script database. Instead, the contents of the message (a text string) can be specified directly in the script configuration. The Message
message
key takes an optional lang
attribute as explained before.
...
The contents of the forecast table can be configured using the ForecastTable
forecastTable
key. The schema for this section is as follows:
...