Skip to main content
Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/ParameterDefinition"

(New page: The parameters returned to the worker will be an AnyMap containing Value objects of the given type: *<tt>name</tt>: the name of the parameter **mandatory **if the name contains a section w...)
Line 1: Line 1:
The parameters returned to the worker will be an AnyMap containing Value objects of the given type:
*<tt>name</tt>: the name of the parameter
*<tt>name</tt>: the name of the parameter

Revision as of 10:49, 9 March 2012

  • name: the name of the parameter
    • mandatory
    • if the name contains a section with '<...>' this section will not be evaluated when evaluating the parameters, e.g. if the definition contained a parameter with the name param<whatever> a configured parameter with the name paramABC would match this parameter definition. This is a kind of wildcard.
  • type: the data type of the parameter
    • optional, default: string
    • The possible types for the parameter definition are derived from the datamodel Any type hierarchy:
      • map,
        • a Map of key/value-pairs as specified by the attribute entries
      • string (default),
        • a String value
      • double,
        • a Double value (value range: see Java Double)
      • boolean,
        • a Boolean value (true / false)
      • long,
        • a Long value (value range: see Java Long)
      • date,
        • a Date value ("yyyy-MM-dd")
      • datetime,
      • any
        • an unspecified Any of any type (will automatically be converted from the given json)
    • A sequence (AnySeq) cannot be specified explicitly. It will be defined implicitly by using the multi key.
  • range: A description of the meaning of the value.
    • optional.
    • Arbitrary value can be used. They could be used by the JobManager for advanced validation or by workflow authoring tools to choose an appropriate input element for editing this parameter value.
    • Currently only one value is used by the JobManager itself:
      • jobName: The value of this parameter is the name of a job that needs to be running so that the worker can work successfully. The JobManager will not allow that a job using the worker is started, if the needed job is not running at job start. Also, it will not allow that the needed job is finished while a job that needs it is still runnning (or finishing). However, it will still be possible to cancel the needed job without stopping the dependent job first.
  • entries: describes keys and types of the entries of a map
    • optional, if not defined any entry types or keys will be accepted
    • can only be used for parameters of type map
    • contains a sequence of parameter descriptions, just like the parameter descriptions on top-level (-> further recursion possible)
  • values: a sequence defining the possible values for a parameter
    • optional
    • the parameter only accepts the values defined in the values sequence
  • multi: boolean value: if 'true' there can be a sequence of values of the defined type.
    • optional
    • default: false
    • Please note that the implementation is not required to return a sequence (AnySeq) if there is only one value of that type. But since Any is an iterable itself you can access these values vie Any's iterable interface.
  • optional: boolean value specifying if the parameter is optional (true) or mandatory (false)
    • default: false, so parameters without the optional flag must be specified.

Back to the top