• Documentation
  • Tutorials
  • Case studies
  • White papers
  • Product

What's on this Page

  • Parameters definition
    • Examples
    • Basic example
    • Using activation expression
    • Using prioritized activation expression
    • Using different scope
    • Parameters table view
  • step
  • User guide
  • Parameters
Categories: USER GUIDE PARAMETERS
This article references one of our previous releases, click here to go to our latest version instead.

Parameters

Parameters are used to define variables which will be accessible from the whole platform in any Plans and Keywords. You can think about Parameters the same way as “Global” variables.

Parameters definition

Parameters minimalistic form is composed of a Key and Value which are defined as String only. In addition to the required Key and Value fields, a Parameter behaviour can also be modified using below fields :

  • Scope : the scope is used to restrict the access to the parameter to specific Keywords
  • Global : accessible for all Keywords
  • Application : accessible by keywords registered for the given application
  • Keyword : accessible only by the specified Keyword
  • Activation expression : a JavaScript (Nashorn) expression can optionally be used here to set the parameter value. Following bindings are available for use in activation expressions :
  • user : the currently logged in user
  • screen settings : any defined screen settings can be used via ID
  • Priority : define the order in which the activation expression will be evaluated (descending order : the higher the priority, the sooner the expression will be evaluated)

Examples

Basic example

To create a Parameter, click on the top level menu Parameters then on the top right “New” button.

Fill in the Key and Value fields then press save.

parameter-creation.png

You can now use “myBasicParameter” in any of your Plan / Keywords :

parameter-basic-test.png

Using activation expression

Let’s now use activation expression to set a parameter (log level in that example) depending of the “Environment” setting.

We have to create the “log” parameter twice (but with different activation expressions):

  • execution on “TEST” environment will set the parameter value to “Debug”
  • execution on “PROD” environment will set the parameter value to “Error”
parameter-expressions.png

You can verify that the value is properly set by running a simple Echo on both environment :

parameter-expressions-execution.png

Using prioritized activation expression

In addition, activation expressions evaluation can be prioritized via the “Priority” setting. In below example, we will define the “log” value to be Error for both Environments with a higher expression priority that the one set for the “Test” environment only :

parameter-expressions-priority.png

The expected behaviour is that on each environment, the log level will be set to Error.

Using different scope

While creating or editing a parameter you may assign it to a given scope to restrict it’s access. The scopes and related access restrictions are described in Parameters definition.

The scope is only used to restrict access to the parameter and play no role in the evaluation of its value, therefore if you use the same parameter key with different scopes without defining proper evaluation expressions and priorities, the result will be nondeterministic.

Application scope

To enable this type of scope, you’ll have to add a new entry in the screen template definition for functionTable. You may refer to the customization section here. The new entry must have the id “attributes.application”.

The following is an example to restrict the access to the Keywords of the given application:

parameters-scope.png

Remark : the scope application is only available if applications were configured in the screen settings as illustrated in below image: admin-settings-screens-functionTable-application.png

Keyword scope

The following shows an example to create a parameter accessible by one specific Keyword.

parameters-scope-keyword.png

Parameters table view

The parameters table view allow you to view and manage existing parameters such as editing, copy/pasting, deleting… You may also track the last modification time and user.

parameters-last-modification.png

See Also

  • Controls
  • Java Plan API
  • Keywords calls
  • Plain text plans
  • Plan modularity
  • Getting Started
  • Whats new?
  • Admin guide
  • User guide
    • Keywords
    • Plans
    • Executions
    • Notifications
    • Parameters
    • Dashboards
    • Monitoring
    • Event Broker Monitor
  • Developer guide
  • Plugins
  • Resources
Step Logo
    • Documentation
    • Tutorials
    • Case studies
    • White papers
    • Product
    • Getting Started
    • Whats new?
    • Admin guide
    • User guide
      • Keywords
      • Plans
      • Executions
      • Notifications
      • Parameters
      • Dashboards
      • Monitoring
      • Event Broker Monitor
    • Developer guide
    • Plugins
    • Resources