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.

Task #

Tasks must inherit the provided abstract Task class.

The super constructor must be called with the task name.


Constructor #

Copied to clipboard!
Task()

Example #

Copied to clipboard!
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
  }
}