Module instance descriptors file
This page is the generated field list for ModuleInstanceDescriptors.xml —
the registry of module instances: the concrete, named things a
workflow <activity> runs by moduleInstanceId. Each
instance still needs its own config file in Config/ModuleConfigFiles/ (e.g.
General Adapter,
Import,
Export) — this file is just the id/name/
description that makes the instance addressable and gives it a place to hang
custom attributes.
At a glance
Section titled “At a glance”Purpose
: Declares each module instance’s id (referenced by workflows) and optional
custom <attribute> values that other config files can pull in by quoting the
attribute id between @s (e.g. @HARD_MAX@) — the same mechanism used on
locations, parameters, and qualifiers.
Folder
: Config/RegionConfigFiles/
Root element
: <moduleInstanceDescriptors> (version="1.0", required)
Referenced by
: moduleInstanceId in a workflow activity.
Depends on : The module type must be registered in Module descriptors.
Minimal example
Section titled “Minimal example”<?xml version="1.0" encoding="UTF-8"?><moduleInstanceDescriptors xmlns="http://www.wldelft.nl/fews" version="1.0"> <moduleInstanceDescriptor id="ImportObservations" name="Import observed data"> <description>Imports observed time series from the external system</description> </moduleInstanceDescriptor> <moduleInstanceDescriptor id="RainfallRunoffModel" name="Rainfall-runoff model"> <description>Runs the rainfall-runoff model via the General Adapter</description> </moduleInstanceDescriptor></moduleInstanceDescriptors>Field reference
Section titled “Field reference”Auto-generated from moduleInstanceDescriptors.xsd. Descriptions are the schema's own annotations.
Element <moduleInstanceDescriptors>
Attributes
| Attribute | Use | Notes |
|---|---|---|
version | required | fixed: 1.0. |
Elements
| Element | Type | Cardinality | Description |
|---|---|---|---|
moduleInstanceDescriptor | ModuleInstanceDescriptorComplexType | required | |
moduleInstanceGroup | ModuleInstanceGroupComplexType | required | |
moduleInstanceDescriptorsCsvFile | ModuleInstanceDescriptorsCsvFileComplexType | required | Since 2022.01 |
persistentIdsCsvFile | PersistentIdsCsvFileComplexType | required · repeats | A file that maps config ids to database ids. Only locations where the config id is different from the database are listed. Config ids can be changed as long the database id stays the same. |
ModuleInstanceDescriptorComplexType
Attributes
| Attribute | Use | Notes |
|---|---|---|
id | required | |
name | optional |
Elements
| Element | Type | Cardinality | Description |
|---|---|---|---|
description | string | optional | |
updateModuleRunTimesOnCompletion | boolean | optional | Since 2021.01. When true run time statistics in ModuleRunTimes Table are updated for this module instance when the module instance is completed. These run times make it possible to predict when data becomes available the next time the workflow is executed |
moduleId | idStringType | optional | Deprecated and obsolete since 2013.02. The module is now recognized from the schema name in the config file. |
simulatedHistoricalModuleInstanceId | idStringType | optional | When this relation is known it is possible to read data before the start of a simulated forecast. The simulated historical update run, current at the moment the forecast is created, will be used for data before the start of the forecast. When different parameters are used for the forecast and historical period it is also required to specify the historical parameter for the forecast parameter When configured this module instance can only be used for simulated forcast time series. When one module instance is a group has a reference to a simulated historical, all module instances in this group should have a relation. All referenced simulated historicals from one group should belong to the same group |
waterCoachExternalForecastDelay | CalendarTimeSpanComplexType | optional | Simulates the delay of an operational environment between the external forecast is produced (external forecast time) and the time the external forecast becomes visible in FEWS. The delay for simulated forecasts is configured in the workflowDescriptors.xml |
ModuleInstanceGroupComplexType
Attributes
| Attribute | Use | Notes |
|---|---|---|
id | required | |
name | optional |
Elements
| Element | Type | Cardinality | Description |
|---|---|---|---|
moduleInstanceDescriptor | ModuleInstanceDescriptorComplexType | required · repeats |
ModuleInstanceDescriptorsCsvFileComplexType
| Element | Type | Cardinality | Description |
|---|---|---|---|
file | nonEmptyStringType | required | Since 2022.01. FEWS-10156. name of a csv file in the map layer files or a full absolute path to the csv file (*.csv). |
charset | charsetEnumStringType | optional | Since 2022.01. FEWS-10156. Character set of the text in the csv file. Specify only when the csv file contains non-western characters.
One of: US-ASCII, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1257, ISO-8859-1, ISO-8859-2, ISO-8859-4, ISO-8859-5, ISO-8859-7, ISO-8859-9, ISO-8859-13, ISO-8859-15, KOI8-R, UTF-8, UTF-16, UTF-16BE, UTF-16LE, windows-1255, windows-1256, windows-1258, ISO-8859-3, ISO-8859-6, ISO-8859-8, windows-31j, EUC-JP, x-EUC-JP-LINUX, Shift_JIS, ISO-2022-JP, x-mswin-936, GB18030, x-EUC-CN, GBK, ISCII91, x-windows-949, EUC-KR, ISO-2022-KR, x-windows-950, x-MS950-HKSCS, x-EUC-TW, Big5, Big5-HKSCS, TIS-620, Big5_Solaris, Cp037, Cp273, Cp277, Cp278, Cp280, Cp284, Cp285, Cp297, Cp420, Cp424, Cp437, Cp500, Cp737, Cp775, Cp838, Cp850, Cp852, Cp855, Cp856, Cp857, Cp858, Cp860, Cp861, Cp862, Cp863, Cp864, Cp865, Cp866, Cp868, Cp869, Cp870, Cp871, Cp874, Cp875, Cp918, Cp921, Cp922, Cp930, Cp933, Cp935, Cp937, Cp939, Cp942, Cp942C, Cp943, Cp943C, Cp948, Cp949, Cp949C, Cp950, Cp964, Cp970, Cp1006, Cp1025, Cp1026, Cp1046, Cp1047, Cp1097, Cp1098, Cp1112, Cp1122, Cp1123, Cp1124, Cp1140, Cp1141, Cp1142, Cp1143, Cp1144, Cp1145, Cp1146, Cp1147, Cp1148, Cp1149, Cp1381, Cp1383, Cp33722, ISO2022_CN_CNS, ISO2022_CN_GB, JISAutoDetect, MS874, MacArabic, MacCentralEurope, MacCroatian, MacCyrillic, MacDingbat, MacGreek, MacHebrew, MacIceland, MacRoman, MacRomania, MacSymbol, MacThai, MacTurkish, MacUkraine |
id | nonEmptyStringType | required | e.g. "%ID%", put the actual column name between %%. |
name | idStringType | optional | put the actual column name between %% |
description | string | optional | When true run time statistics in ModuleRunTimes Table are updated for this module instance when the module instance is completed. These run times make it possible to predict when data becomes available the next time the workflow is executed. "%ID%", put the actual column name between %%. |
group | string | optional | All module instances with same group id share the same branch and module run. Reduces the number of module runs but is no longer possible to run the modules independent %%. |
groupName | string | optional | put the actual column name between %%. |
updateModuleRunTimesOnCompletion | idStringType | optional | Since 2021.01. When true run time statistics in ModuleRunTimes Table are updated for this module instance when the module instance is completed. These run times make it possible to predict when data becomes available the next time the workflow is executed. "%ID%", put the actual column name between %%. |
simulatedHistoricalModuleInstanceId | idStringType | optional | When this relation is known it is possible to read data before the start of a simulated forecast. The simulated historical update run, current at the moment the forecast is created, will be used for data before the start of the forecast. When different parameters are used for the forecast and historical period it is also required to specify the historical parameter for the forecast parameter. When configured this module instance can only be used for simulated forecast time series. When one module instance is a group has a reference to a simulated historical, all module instances in this group should have a relation. All referenced simulated historicals from one group should belong to the same group "%ID%", put the actual column name between %%. |
waterCoachExternalForecastDelayHours | idStringType | optional | Simulates the delay of an operational environment between the external forecast is produced (external forecast time) and the time the external forecast becomes visible in FEWS. The delay for simulated forecasts is configured in the workflowDescriptors.xml. "%ID%", put the actual column name between %%. |
timeZoneOffset | timeZoneOffsetStringType | optional | This offset is always relative to GMT. For example "+02:00" means GMT+02:00. If no offset specified, then time zone GMT is used by default. |
dateTimePattern | nonEmptyStringType | optional | Optional pattern for the dateTime attributes. Default is yyyyMMdd, this is the internal format a dbf file is using when the column is of type 'D'. |
attributeFile | ModuleInstanceDescriptorAttributeFileComplexType | optional · repeats | Links an extra csv file to the current shape file to import extra attributes. Optionally allows defining different values for different periods and multiple values (tables) per attribute |
attribute | AttributeComplexType | optional · repeats | Custom attribute that can be referenced from id maps, validation rules, thresholds, warning levels, transformations. e.g. "%EXTERNAL_ID%, put the actual column name between %% |
PersistentIdsCsvFileComplexType
| Element | Type | Cardinality | Description |
|---|---|---|---|
file | nonEmptyStringType | required | name of layer in the map layer files or a full absolute path to the csv file (*.csv). |
charset | charsetEnumStringType | optional | Character set of the text in the csv file. Specify only when the csv file contains non western characters.
One of: US-ASCII, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1257, ISO-8859-1, ISO-8859-2, ISO-8859-4, ISO-8859-5, ISO-8859-7, ISO-8859-9, ISO-8859-13, ISO-8859-15, KOI8-R, UTF-8, UTF-16, UTF-16BE, UTF-16LE, windows-1255, windows-1256, windows-1258, ISO-8859-3, ISO-8859-6, ISO-8859-8, windows-31j, EUC-JP, x-EUC-JP-LINUX, Shift_JIS, ISO-2022-JP, x-mswin-936, GB18030, x-EUC-CN, GBK, ISCII91, x-windows-949, EUC-KR, ISO-2022-KR, x-windows-950, x-MS950-HKSCS, x-EUC-TW, Big5, Big5-HKSCS, TIS-620, Big5_Solaris, Cp037, Cp273, Cp277, Cp278, Cp280, Cp284, Cp285, Cp297, Cp420, Cp424, Cp437, Cp500, Cp737, Cp775, Cp838, Cp850, Cp852, Cp855, Cp856, Cp857, Cp858, Cp860, Cp861, Cp862, Cp863, Cp864, Cp865, Cp866, Cp868, Cp869, Cp870, Cp871, Cp874, Cp875, Cp918, Cp921, Cp922, Cp930, Cp933, Cp935, Cp937, Cp939, Cp942, Cp942C, Cp943, Cp943C, Cp948, Cp949, Cp949C, Cp950, Cp964, Cp970, Cp1006, Cp1025, Cp1026, Cp1046, Cp1047, Cp1097, Cp1098, Cp1112, Cp1122, Cp1123, Cp1124, Cp1140, Cp1141, Cp1142, Cp1143, Cp1144, Cp1145, Cp1146, Cp1147, Cp1148, Cp1149, Cp1381, Cp1383, Cp33722, ISO2022_CN_CNS, ISO2022_CN_GB, JISAutoDetect, MS874, MacArabic, MacCentralEurope, MacCroatian, MacCyrillic, MacDingbat, MacGreek, MacHebrew, MacIceland, MacRoman, MacRomania, MacSymbol, MacThai, MacTurkish, MacUkraine |
configId | nonEmptyStringType | required | config ids in the csv file. e.g. "H_%ID%", put the actual csv column name between %%. |
persistentId | nonEmptyStringType | required | persistent ids in the csv file. e.g. "%DATABASE_ID%", put the actual csv column name between %%. |
CalendarTimeSpanComplexType
Attributes
| Attribute | Use | Notes |
|---|---|---|
unit | required | |
divider | optional | |
multiplier | optional |
ModuleInstanceDescriptorAttributeFileComplexType
| Element | Type | Cardinality | Description |
|---|---|---|---|
description | nonEmptyStringType | optional | Description |
csvFile | nonEmptyStringType | required | name of csv file in the map layer files or a full absolute path to the csv file. |
charset | charsetEnumStringType | optional | Character set of the text in the csv file. Specify only when the dbf file contains non-western characters.
One of: US-ASCII, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1257, ISO-8859-1, ISO-8859-2, ISO-8859-4, ISO-8859-5, ISO-8859-7, ISO-8859-9, ISO-8859-13, ISO-8859-15, KOI8-R, UTF-8, UTF-16, UTF-16BE, UTF-16LE, windows-1255, windows-1256, windows-1258, ISO-8859-3, ISO-8859-6, ISO-8859-8, windows-31j, EUC-JP, x-EUC-JP-LINUX, Shift_JIS, ISO-2022-JP, x-mswin-936, GB18030, x-EUC-CN, GBK, ISCII91, x-windows-949, EUC-KR, ISO-2022-KR, x-windows-950, x-MS950-HKSCS, x-EUC-TW, Big5, Big5-HKSCS, TIS-620, Big5_Solaris, Cp037, Cp273, Cp277, Cp278, Cp280, Cp284, Cp285, Cp297, Cp420, Cp424, Cp437, Cp500, Cp737, Cp775, Cp838, Cp850, Cp852, Cp855, Cp856, Cp857, Cp858, Cp860, Cp861, Cp862, Cp863, Cp864, Cp865, Cp866, Cp868, Cp869, Cp870, Cp871, Cp874, Cp875, Cp918, Cp921, Cp922, Cp930, Cp933, Cp935, Cp937, Cp939, Cp942, Cp942C, Cp943, Cp943C, Cp948, Cp949, Cp949C, Cp950, Cp964, Cp970, Cp1006, Cp1025, Cp1026, Cp1046, Cp1047, Cp1097, Cp1098, Cp1112, Cp1122, Cp1123, Cp1124, Cp1140, Cp1141, Cp1142, Cp1143, Cp1144, Cp1145, Cp1146, Cp1147, Cp1148, Cp1149, Cp1381, Cp1383, Cp33722, ISO2022_CN_CNS, ISO2022_CN_GB, JISAutoDetect, MS874, MacArabic, MacCentralEurope, MacCroatian, MacCyrillic, MacDingbat, MacGreek, MacHebrew, MacIceland, MacRoman, MacRomania, MacSymbol, MacThai, MacTurkish, MacUkraine |
id | nonEmptyStringType | required | ids of the module instance in the csv file. e.g. "H_%ID%", put the actual column name between %%. |
attribute | AttributeComplexType | optional · repeats | Custom attribute that can be referenced from id maps, validation rules, thresholds, warning levels, transformations. e.g. "%EXTERNAL_ID%, put the actual column name between %% |
AttributeComplexType
Attributes
| Attribute | Use | Notes |
|---|---|---|
id | optional | Id of the attribute, this id can be referenced from id maps, validation rules, thresholds, warning levels. An location/parameter/qualfier attribute is referenced from other config files by quoting the attribute id with @s, e.g. @HARD_MAX@. |
name | optional | name of the attribute, the name will be used in the FEWS Gui. For example in the modifiers display |
Elements
| Element | Type | Cardinality | Description |
|---|---|---|---|
description | nonEmptyStringType | optional | Describes where and why this attribute is used |
required | boolean | optional | When there is no value for the referenced column are config error is logged |
number | nonEmptyStringType | required | Number that can be referenced from id maps, validation rules, thresholds, warning levels, transformations e.g. "%HARD_MAX% put the actual column name %% Expressions are allowed, eg %HARD_MAX%/1000 + %CONSTANT% |
boolean | nonEmptyStringType | required | Can be used in transformations. In transformations 0=false and 1=true. t, T, y, Y are recognized as true in dbf, f, F, n, M are recognized as false in dbf. 0 and 1 is also allowed when you reference a number column instead of boolean column |
dateTime | nonEmptyStringType | required | Since 2018.01. Can be used in modifiers and reports. e.g. "%EXTERNAL_ID%, put the actual column name between %% e.g. "%PARS%, when the PARS column in the csv file lists the date and time. e.g "1992-07-09T17:00". |
text | nonEmptyStringType | required | Text that can be referenced from id maps, validation rules, thresholds, warning levels, transformations. e.g. "%EXTERNAL_ID%, put the actual column name between %% e.g. "%PARS%, when the PARS column in the dbf file lists the parameter. e.g "H Q.in" you can use the attributeTextContains constraint when defining a locations set to only include the locations that has Q.in |
enumerationValue | nonEmptyStringType | required · repeats | When configured a config error will be logged when the attribute value do not equal one of the enumeration values. In the tabular config file viewer a dropdown list will appear when editable |
regularExpression | nonEmptyStringType | required | When configured a config error will be logged when the attribute value does not match the expression |
Gotchas
Section titled “Gotchas”moduleId(the old way of pointing an instance at its module type) is deprecated since 2013.02 — FEWS now infers the module type from the root element of the instance’s own config file. Leave it out.<attribute>values here are only reachable from other config as@THEIR_ID@— a plain reference by element name won’t resolve.
See also
Section titled “See also”- Reference: Module descriptors file · Workflow file
- Task guide: Workflows & scheduling
- Schema:
moduleInstanceDescriptors.xsd