Declaring Service Parameters

A Service declares parameters to reflect the ones expected by the underlying ruleset and rule. Each parameter states its corresponding Java type. A parameter might also declare properties, for example to refine the Service launch page behavior.

String

Service Type String
Rule Type String
Launch UI Control Input field
Properties
  • password: Boolean to determine whether the parameter is used to transport a password. This setting is reflected in the default service launch page to show a password input control. It also avoids sending back the password value when requesting the service launch state.

Boolean

Service Type boolean
Rule Type boolean
Launch UI Control Checkbox
Properties None

Number

Service Type int, double, etc.
Rule Type int, double, etc.
Launch UI Control Input field
Properties None

Storage

Service Type com.sodius.mdw.server.storage.Storage
Rule Type String or java.io.File
If String, the argument will be the absolute path of a File in which data can be read and written.
Launch UI Control URI Input field / File Dialog
Properties
  • direction: in (default) or out.
    If out and no URI was entered when launching the service, a new Storage is created before launching the service and the absolute path of the created (empty) File is given to the ruleset. The ruleset is expected to modify the content of this file.
  • Content-Type: an HTTP content type (e.g. application/xml) for the the updated Storage (only if direction is out).
  • Content-Encoding: an HTTP content encoding (e.g. UTF-8) for the the updated Storage (only if direction is out).
  • Content-Disposition: an HTTP content disposition (e.g. filename="result.xml") for the the updated Storage (only if direction is out).
  • Content-Expiration: Number of seconds after which the Storage expires (only if direction is out).

Related concepts
Service
Storage

Related tasks
Adding Services