Workflow Properties


When running handle or onEvent functions, you can modify this object to add or update properties:

module.exports.handle = function* (...input) {
   ...
   this.p = 0;
   ...
};

Setting properties can be helpful in two ways:

  • any property updates are logged and displayed on the dashboard. It's a great way to check a variable value during a workflow processing.
  • the scope of the properties is the workflow instance - it means that those values are shared between the handle function and all the processings of the onEvent functions. It can be useful, for example to implement a persistent event.

Forbiden Properties

Some keywords (for example: this.run) are reserved by Zenaton and must not be used to store properties - you'll find the list here