Official Plugins (Kuzzle v2.x)
Workflows v0.x
2

This plugin is part of the Kuzzle Enterprise Plan. If you are interested, please contact us.

Predicate #

Predicates must inherit the provided abstract Predicate class.

The super constructor must be called with the predicate name.


Constructor #

Predicate()

Example #

import { Predicate } from 'kuzzle-plugin-workflows';

class WeatherPredicate extends Predicate {
  constructor () {
    super('weather-predicate');
  }

  // This method must be implemented
  async run (workflow: Workflow, payload: JSONObject, args: JSONObject): Promise<boolean> {
    // ...custom validation function
  }
}