Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


< SMILA‎ | Documentation
Revision as of 16:04, 31 May 2012 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Pipelet and Worker descriptions contain a section that describes the parameters that can be set in the pipelet configuration (in the BPEL pipeline) or in the job or workflow in which a worker appears. The parameter description is a sequence of maps, each of which describes a (top-level) parameter. A parameter can be a single or multiple value or even a complex structure. One of these parameter description maps can contain the following properties (only the name is mandatory and not all are evaluated by the server, some of them may be used in authoring tools):

  • name: the name of the parameter
    • 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.
  • description: the informal description of the parameter
  • type: the data type of the parameter
    • The possible types for the parameter definition are derived from the datamodel Any type hierarchy:
      • string (the default, if no type is given): 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: a Date value with time portion ("yyyy-MM-dd'T'HH:mm:ssZ", see Javadoc of SimpleDateFormat for the meaning of the format string)
      • any: an unspecified Any of any type (will automatically be converted from the given json)
      • map: a Map of key/value-pairs as specified by the attribute entries (see below)
    • A sequence (AnySeq) cannot be specified explicitly. It will be defined implicitly by using the multi key.
  • range: Limits the possible values of the parameter
    • an arbitrary string can be used as identifier for the range. It 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:
      • jobName: The value of this parameter is the name of a job from the server. The job 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. Up to now this is the only range known by the server.
      • pipelineName: The value of this parameter is the name of a BPEL pipeline from the server.
      • workflowName: The value of this parameter is the name of a asynchronous workflow from the server.
      • pipeletClass: The value of this parameter is the class of a SMILA pipelet.
      • storeName: The value of this parameter is the name of a store from the server.
  • 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
    • the parameter only accepts the values defined in the values sequence
    • each element in the sequence can be either a simple value, or a map containing at least a property value containing the allowed value. Such a map can contain additional properties like description for the value's meaning.
  • optional: boolean value specifying if the parameter is optional (true) or mandatory (false)
    • default: false, so parameters without the optional flag must be specified.
  • multi: boolean value: if 'true' there can be a sequence of values of the defined type.
    • 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.
  • min: If multi is 'true', it defines the minimum count of elements in the sequence - not evaluated by SMILA up to now
  • max: If multi is 'true', it defines the maximum count of elements in the sequence - not evaluated by SMILA up to now
  • pattern: Defines a regular expression to match against the value - not evaluated by SMILA up to now

See the worker and pipelet description included in SMILA for examples. Additional properties can be added at any place in the description structure, for example to add other comments or tooling information. This is ignored by SMILA itself.

Bundle org.eclipse.smila.common contains a class org.eclipse.smila.common.defitions.ParameterDefinition that can be used to interpret such descriptions parsed from JSON into an Any object.

Back to the top