Task #
Tasks must inherit the provided abstract Task
class.
The super constructor must be called with the task name.
Constructor #
Task()
Example #
import { Task } from 'kuzzle-plugin-workflows';
class CreateAlertTask extends Task {
constructor () {
super('create-alert-task');
}
// This method must be implemented
async run (workflow: Workflow, payload: JSONObject, args: JSONObject): Promise<void> {
// ... do things
}
}
Edit this page on Github(opens new window)