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
}
}
Edit this page on Github(opens new window)