Versions Compared

Key

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

...

  • 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.
    This class can be executed outside FEWS for testing with
    bin/windows/Delft-FEWSc.exe -Xmx512m -Djava.library.path=adapterbin -Wclasspath.1=adapterbin\*.jar -Wmain.class=classname arguments
  • 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. Or this method could be used to instantiate a separate JVM for the process being executed
  • 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 using Fews-bin
<command>
	<className>nl.wldelft.fews.adapter.urbsiniadapter.UrbsIniAdapter</className>
	<customJreDir>$FEWS_BIN_DIR$/windows/jre</customJreDir>
	<jvmArg>-mx512m</jvmArg>
</command>
console

Element for connecting the console output of the activity to FEWS

  • redirectToLogFile: Since 2018.02. Write the console output written by the executable to the specified file.
  • restartWorkflowLinePattern: Since 2018.01. As soon the executable writes a line, matching this pattern, to the console the complete workflow is restarted 
  • maxRestartWorkflowCount: Since 2018.01. Max number of times the workflow is restarted. Default is 2
  • progressPattern: Since 2021.02. Pattern to extract a percentage number from a console log line, each line will be checked for the pattern when it comes through. The places of the question marks should contain the value. Will be read as double but written as integer rounded down. Question marks should be at the start or end of the pattern. For instance "progress: ???" When used in combination with "activityDurationWeight" it will be scaled accordingly. For instance when 2 activities are present with a weight of 1, the first progress will be rescaled from 0 to 50 and the second from 50 to 100.
arguments

Optional. Root element for defining arguments to be passed to the executable/Java class

...