Not supported anymore since 2017.02, completely removed since 2022.02. Please use 30 Config Update Module instead.


Functionality to automatically import and process regional configuration changes in locations, locationSets, location and attribute files (DBF or CSV)


Function:

Automatic update of configuration

Where to Use?

Everywhere: locations, locationSets, location and attribute files (DBF or CSV)

Why to Use?

To let the system be updated by other maintenance programs.

Description:

Functionality to automatically import and process regional configuration changes in locations, locationSets, location and attribute files (DBF or CSV)

Available since:

DelftFEWS2008.01, update in 2009.01 (DBF, maplayers), update in 2016.01 (support for CSV maplayer files)

Contents

Overview

To be able to have other programs that maintain the list locations, locationSets etc, it is possible to import configuration changes through an import that imports update script files.
The configuration update works like a regular data import. There is a moduleinstance that imports PI update script files from an import directory. The script file contains options for the next possible configuration updates:

This functionality supports CSV files since 2016.01.


This functionality only works for configurations that are distributed through the database via the Config Manager.

Configuration

Configuration Update Script ModuleConfigFile

See the schema of the import moduleinstance at configUpdateScriptConfig.xsd

The config file is very simple:

<?xml version="1.0" encoding="UTF-8"?>
<configUpdateScriptConfig 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://www.wldelft.nl/fews" 
    xsi:schemaLocation="http://www.wldelft.nl/fews 
                    http://fews.wldelft.nl/schemas/version1.0/configUpdateScriptConfig.xsd">

  <versionIncrement>0.1</versionIncrement>
  <scriptDirectory>$IMPORT_FOLDER$/ConfigUpdate</scriptDirectory>
  <failedDirectory>$IMPORT_FAILED_FOLDER$/ConfigUpdate</failedDirectory>
</configUpdateScriptConfig>

versionIncrement = Number to increment configuration file version with. Note that the increment should be zero in case no version numbers are used in the config files.
scriptDirectory = Location of script files to be imported.
failedDirectory = Files that could not be imported due to an error are copied to this directory.
backupDirectory = Successfully imported files are moved to this directory.

PI Configuration Update Script

In the import directory the configuration update script files should be available. See the schema of the import moduleinstance at pi_configupdatescript.xsd

<?xml version="1.0" encoding="UTF-8"?>
<configUpdateScript version="1.2" 
   xsi:schemaLocation="http://www.wldelft.nl/fews/PI 
                      http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_configupdatescript.xsd"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI">
   <updateCommand>
     <importMapLayerFiles>
	<importPath></importPath>
     </importMapLayerFiles>
   </updateCommand>

.... or

  <updateCommand>
    <addLocation>
      <location id="loc2" name="loc2">
        <description>description</description>
        <shortName>short</shortName>
        <toolTip>new location</toolTip>
        <x>1</x>
        <y>2</y>
        <z>3</z>
      </location>
    </addLocation>
  </updateCommand>

.... or

  <updateCommand>
    <addLocationSetItem locationId="loc2" locationSetId="Boezem_Poldergemaal_H.meting">
      <idMapData idMapId="IdImportCAW" internalParameterId="H.meting" externalLocationId="C-new-ext" externalParameterId="P-new-ext"/>
      <validationRuleData parameterId="H.meting" hardMax="150" hardMin="-10" rateOfRise="10" rateOfFall="-10"/>
    </addLocationSetItem>
  </updateCommand>

</configUpdateScript>

Note that the importPath is relative to the location of the PI script file.

Sample input and output

Example ConfigUpdateScript.zip

Error and warning messages

Description of errors and warnings that may be generated

Error:

Error message

Action:

Action to fix

Known issues

None

Related modules and documentation

None

Technical reference

Entry in moduleDescriptors:

Specification of: ENTRY and DESCRIPTION in the SystemConfigFiles\ModuleDescriptors.xml


  <moduleDescriptor id="ConfigUpdateScript">
    <className>nl.wldelft.fews.system.plugin.configupdatescript.ConfigUpdateScript</className>
  </moduleDescriptor>