Skip to content

Deep Dive | Configurations

Smith, Tim edited this page Dec 29, 2016 · 3 revisions

The configurations property is an object containing configuration objects that each describe the tasks a job should execute. This is the top level schema with all possible properties:

{
  "configurations": {
    "<configuration_name>": {
      "name": "",
      "externalModules": {},
      "executionPlan": {},
      "templates": {},
      "exports": {},
      "customData": {}
    }
  }
}

Notes

  • Replace <configuration_name> with any name desired. This name is only used for reference purposes

Table of Contents

Configuration Processing

When processing a configuration object, the properties are processed in this order

  1. externalModules are loaded
  2. executionPlan objects are executed
  3. templates are compiled and run
  4. exports are processed

Property Documentation

name

(string) The human-friendly name of the object. This value is completely arbitrary.

externalModules

(Object) An object of key/value pairs defining the path to JavaScript files to load as node modules. The value for each property should be a string path. The JavaScript file will be loaded as a node module and made available via the def object in a property with the same name as the key.

Example

"externalModules": {
  "verintModule": "./extensions/verint/verint.js"
}

This will load verint.js into def.verintModule. Functions and properties can be accessed from this module as def.verintModule.functionName().

executionPlan

(Object) An object of key/value pairs referencing requests and transforms. The objects will be executed in the order in which they are defined. This allows requests and transforms to be mixed in together to use the results of one request for another request.

The values should be a JSON pointer to a request or transform object in the config file. The property name is arbitrary.

Example

"executionPlan": {
  "my_query": {
    "$ref": "#/requests/my_query"
  },
  "my_transform": {
    "$ref": "#/transforms/my_transform"
  }
}

templates

(Object) An object of key/value pairs referencing templates. The templates will be executed in the order in which they are defined. The value for each property should be a JSON pointer.

exports

(Object) An object of key/value pairs referencing exports. The exports will be executed in the order in which they are defined. The value for each property should be a JSON pointer.

customData

(Object) An object of key/value pairs defining custom data to be made available to the request and template. Each key/value pair will be set to def.vars as def.vars[key] = value.