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

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 #

Copied to clipboard!

Example #

Copied to clipboard!
import { Predicate } from 'kuzzle-plugin-workflows';

class WeatherPredicate extends Predicate {
  constructor () {

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