Process module runtime configuration

The ${} placeholder configures the process at definition time and is evaluated as the process is created.

Runtime configuration applies after the process has been created. Runtime configuration can be copied along with the process when the process is copied, providing a method for users to configure processes and reuse them.

Workers support multiple potential places for runtime configuration, but as a standard the Configuration options field is used on both workers and groups to hold runtime configuration.

Runtime configuration needs default values. Rather than writing this to the worker or group's Configuration options field, which would expose too much complexity, a convention is used to look first in the configuration options field and then to a default value if not defined.

This requires a process step and two runtime options.

Assuming the configuration data has the reference "fooBar", then we need a process step like this:

{
"name": "get_fooBar",
"script": "stepTypeGetData",
"config": {
  "data": {
    "type": "%PLACEHOLDER",
    "placeholderType": "find",
    "data": [
      "%{configOptions:fooBar}",
      "${defaultConfig.fooBar}"
    ]
  }
},
"next": false
}

In the options, we would have.

{
"fooBar": "%{call:get_fooBar}",
"defaultConfig": {
"fooBar": {
// default value of foobar
}
}
}

This means that:

  • The definition-time placeholder "${fooBar}" can be used to reference the data. This is a reference to a runtime option which resolves to "%{call:get_foobar}", i.e. a call to the "get_fooBar" step.
  • At runtime, the "get_fooBar" will return either the value from the configuration options or the default value.
  • All default values are held in a configuration options "defaultConfig" object. This is important for Repackaging a modified process module.

Runtime configuration options are global in scope (they apply to all components used in the task or group), and are not therefore structured into objects by component, though they may include nested objects.