The Datalist is responsible for data manipulation and storage within Warewolf. The Datalist itself is made up of four primary components: Storage, Translators, Evaluation and Mapping. Each component is described below:
Warewolf Storage is handled by .Net. It uses F# Map’s for each of the types of data that Warewolf supports i.e Scalars, Recordsets and Objects. These structures can be found in the DataStore module in the WarewolfLanguageParser project.
Datalist translators are used to transform the data stored within the Datalist into a certain format or from a certain format into the Datalist, e.g. XML to Datalist, data table to Datalist or Datalist to JSON. Translators are also used to transform data that comes into the Warewolf server and data that is emitted from the Warewolf server makes use of the storage layer to retrieve or store the values from the translation depending on which way the translation is happening.
The evaluation component of the Datalist is responsible for determining if a piece of data needs to be evaluated i.e. it is a variable and the data needs to be retrieved. Evaluation caters for recursive evaluation i.e. [[[[world]]]] would be recursively evaluated as [[world]] where [[world]] had the value of “bob” and then [[bob]] as “my name is bob” where [[bob]] had the value “my name is bob” stored in it. [[world]] would be evaluated to [[bob]] which would be evaluated to “my name is bob”. Variables with a value of a variable e.g. if world evaluated to [[bob]] (note the braces) then no more evaluation would happen. To nest evaluation, you need to define at design time the number of levels by placing the [[ ]] upfront.
Mapping in Warewolf refers to how variables are related to each other, between services and from which variables data will be retrieved and into which variables this data will be stored. Therefore variables have a ColumnIODirection which can be set as Input, Output or Both which allows the limiting of which variables can accept data and which variables emit data between services. The ColumnIODirection of a variable is set through the Studio variable list.