Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is possible to have the parameterfile filled with location attributes. When exporting the parameter file, FEWS will loop over all the locations in the given locationSet, or through the given locationIds, and add the configured attributes to the parameterfile. For an example of a template parameterfile, see 02 Module Parameters. Notice that the element "model" references to the model in the template parameter file.

exportLocationAttributesCsvActivity (since 2020.01)

Exports location attributes to csv format. Supports empty location sets, <locationIdColumn> optionalSkips by default when encountering empty or non-existing location sets.

Can export empty files with header (i.e. column names) only when using optional element

<exportEmptyHeaderFile>true<exportEmptyHeaderFile>

The second optional element is

<locationIdColumn>
Code Block
languagexml
titleExample config
<exportLocationAttributesCsvActivity>
   <exportFile>ExportLocationAttributes.csv</exportFile>
   <locationSetId>ExportLocationAttributesCsv</locationSetId>
   <exportEmptyHeaderFile>true</exportEmptyHeaderFile>
   <locationIdColumn columnName="Id"/>
   <attributeColumn columnName="A" attributeId="A"/>
   <attributeColumn columnName="B" attributeId="B"/>
   <attributeColumn columnName="C" attributeId="C"/>
</exportLocationAttributesCsvActivity>
<exportLocationAttributesCsvActivity>
   <exportFile>ExportLocationAttributesNoId.csv</exportFile>
   <locationSetId>ExportLocationAttributesCsv</locationSetId>
   <attributeColumn columnName="A" attributeId="A"/>
   <attributeColumn columnName="C" attributeId="C"/>
</exportLocationAttributesCsvActivity>

...

  • executable - File name and location of the executable to run the command is an executable. The file name may include environment variables, as well as tags defined in the general adapter or on the global.properties.
  • console.redirectToLogFile Since 2018.02. Write the console output written by the executable to the specified file.
  • className - Name of Java Class to run if the command defined as a Java class. This class may be made available to Delft-FEWS in a separate JAR file in the \Bin directory.
  • binDir - Optional. Directory with jar files and optionally native dlls. When not specified the bin dir and classloader of FEWS is used. When specified the java class is executed in a private class loader, it will not use any jar in the FEWS bin dir. Only one class loader is created per binDir, adapters should still not use static variables. All dependencies should also be in this configured bin dir.
  • moduleDataSetName - Optional. As of 2014.02 it is possible to update the binaries in the binDir using a module data set. The loaded binaries will first be unloaded before the content of the module dataset is unpacked to binDir. Since 2017.01 the binDir will be deleted in order to update it, therefore a restriction has been build in that the binDir should be a sub directory of the region home or named "bin".
  • customJreDir - Optional. As of 2016.01 it possible to configure a directory of a specific jre that should be used to run a java class. This could be required for modules that are not compatible with the java version used by FEWS.
  • jvmArg - Optional, unbounded and only in combination of customJreDir. Specifies extra jvm arguments for instance -mx512m to give the jvm more memory than the -mx256m that FEWS uses by default for the custom jre.
Code Block
languagexml
titleExample customJre
<command>
	<className>nl.wldelft.fews.adapter.urbsiniadapter.UrbsIniAdapter</className>
	<customJreDir>%ROOT_DIR%/jre</customJreDir>
	<jvmArg>-mx512m</jvmArg>
</command>

...

Example of a client config for stand alone when importing to the warm states directory. The meta data is still stored in the data base. Files in this directory that don't have meta data will be automatically deleted by the rolling barrel.

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<clientConfiguration xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/clientConfig.xsd">
   <localDataStoreFormat>Firebird</localDataStoreFormat>
   <warmStatesDirectory>%REGION_HOME%/warmStates</warmStatesDirectory>
</clientConfiguration>

...


Elements of the Shutdown Activities configuration
This activity is the identical to the startUpActivities. The only difference is that these are carried out after the module run and import of data. See definition of StartUp activities for configuration.

  ignoreNonExistingLocationSets

 <command> <className>nl.wldelft.fews.adapter.urbsiniadapter.UrbsIniAdapter</className> <customJreDir>%ROOT_DIR%/jre</customJreDir> <jvmArg>-mx512m</jvmArg> </command>

...