Ethel Docs

Runner development

When starting a new runner, look for the most recently updated runner of the type you're working on to use as a reference.

Any class implementing the interface and extending the base class have access to a bunch of functionality. Check the BaseRunner class and IRunnersService interface for the functionality available.

Lookups

Lookups provide a way of storing values in the database for later use. Use the lookup functions on the task service. Most often used for storing encrypted information.

  • lookupDelete - deletes the specified lookup
  • lookupGet - returns the specified lookup
  • lookupSet - adds or updates the specified lookup

Conventions

Runners should only extract their values in the processTask function and they should be supplied to other functions in the class via the config object. Reasons for the config object:

  • avoid hard coding value locations throughout the runner. This is useful if a value moves from the message object to the config object, or vice versa. In some cases the value may be in either location depending on configruation.
  • It's also better to use the messageValueGet function to retrieve items from the message object as it handles non-standard attribute names that dot notation will not. e.g. number based attributes.